diff --git a/.github/workflows/semantic-pr.yml b/.github/workflows/semantic-pr.yml index 62b4a6d..f6a436c 100644 --- a/.github/workflows/semantic-pr.yml +++ b/.github/workflows/semantic-pr.yml @@ -16,6 +16,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@v5 + - uses: amannn/action-semantic-pull-request@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/generated/Client.php b/generated/Client.php index 21562a8..c11a7a6 100644 --- a/generated/Client.php +++ b/generated/Client.php @@ -78,7 +78,7 @@ public function auditLogList(array $queryParameters = [], string $fetch = self:: * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\AuditLogActionType[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\AuditLogActionType[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\AuditLogActionTypesBadRequestException * @throws Exception\AuditLogActionTypesUnauthorizedException @@ -799,7 +799,7 @@ public function auditLogList2(array $queryParameters = [], string $fetch = self: * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\AuditLogActionType[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\AuditLogActionType[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\AuditLogActionTypes2BadRequestException * @throws Exception\AuditLogActionTypes2UnauthorizedException @@ -2293,7 +2293,7 @@ public function importDataDatabaseTableAsync(int $tableId, Model\TableImport $re * @param int $databaseId returns only tables that are related to the provided value * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\Table[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\Table[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListDatabaseTablesBadRequestException * @throws Exception\ListDatabaseTablesNotFoundException @@ -2373,7 +2373,7 @@ public function orderDatabaseTables(int $databaseId, Model\OrderTables $requestB /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\Token[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\Token[]|\Psr\Http\Message\ResponseInterface|null */ public function listDatabaseTokens(string $fetch = self::FETCH_OBJECT) { @@ -2727,7 +2727,7 @@ public function createDatabaseTableViewFilterGroup(int $viewId, ?Model\CreateVie * @param int $viewId returns only filters of the view related to the provided value * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\ViewFilter[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\ViewFilter[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListDatabaseTableViewFiltersBadRequestException * @throws Exception\ListDatabaseTableViewFiltersNotFoundException @@ -2765,7 +2765,7 @@ public function createDatabaseTableViewFilter(int $viewId, Model\CreateViewFilte * @param int $viewId returns only groupings of the view related to the provided value * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\ViewGroupBy[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\ViewGroupBy[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListDatabaseTableViewGroupingsBadRequestException * @throws Exception\ListDatabaseTableViewGroupingsNotFoundException @@ -2825,7 +2825,7 @@ public function rotateDatabaseViewSlug(int $viewId, array $headerParameters = [] * @param int $viewId returns only sortings of the view related to the provided value * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\ViewSort[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\ViewSort[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListDatabaseTableViewSortingsBadRequestException * @throws Exception\ListDatabaseTableViewSortingsNotFoundException @@ -3384,7 +3384,7 @@ public function listDatabaseTableGridViewRows(int $viewId, array $queryParameter * @param int $viewId returns only rows that belong to the related view's table * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\ExampleRowResponse[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\ExampleRowResponse[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\FilterDatabaseTableGridViewRowsBadRequestException * @throws Exception\FilterDatabaseTableGridViewRowsNotFoundException @@ -3789,7 +3789,7 @@ public function updateDatabaseTableWebhook(int $webhookId, ?Model\PatchedTableWe * @param int $tableId returns only webhooks of the table related to this value * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\TableWebhook[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\TableWebhook[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListDatabaseTableWebhooksBadRequestException * @throws Exception\ListDatabaseTableWebhooksNotFoundException @@ -3848,7 +3848,7 @@ public function secureFileServeDownload(string $signedData, string $fetch = self /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\WorkspaceUserWorkspace[]|\Psr\Http\Message\ResponseInterface|null */ public function listGroups(string $fetch = self::FETCH_OBJECT) { @@ -3959,7 +3959,7 @@ public function leaveGroup(int $groupId, string $fetch = self::FETCH_OBJECT) * @param int $groupId the group id we want the permission object for * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\PermissionObject[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\PermissionObject[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\GroupPermissionsNotFoundException */ @@ -4078,7 +4078,7 @@ public function rejectGroupInvitation(int $groupInvitationId, string $fetch = se * @param int $groupId returns only invitations that are in the group related to the provided value * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\WorkspaceInvitation[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListGroupInvitationsBadRequestException * @throws Exception\ListGroupInvitationsNotFoundException @@ -4200,7 +4200,7 @@ public function updateGroupUser(int $groupUserId, ?Model\PatchedUpdateWorkspaceU * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\ListWorkspaceUsersWithMemberData[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListGroupUsersBadRequestException * @throws Exception\ListGroupUsersNotFoundException @@ -4326,7 +4326,7 @@ public function getJob(int $jobId, string $fetch = self::FETCH_OBJECT) /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\License[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\License[]|\Psr\Http\Message\ResponseInterface|null */ public function adminLicenses(string $fetch = self::FETCH_OBJECT) { @@ -4432,7 +4432,7 @@ public function adminLicenseCheck(int $id, string $fetch = self::FETCH_OBJECT) * @param int $id the internal identifier of the license, this is `id` and not `license_id` * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\LicenseUser[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\LicenseUser[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\AdminFillRemainingSeatsOfLicenseBadRequestException * @throws Exception\AdminFillRemainingSeatsOfLicenseNotFoundException @@ -4567,7 +4567,7 @@ public function markAllWorkspaceNotificationsAsRead(int $workspaceId, string $fe * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\OpenApiRoleAssignment[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\GroupListRoleAssignmentsBadRequestException * @throws Exception\GroupListRoleAssignmentsNotFoundException @@ -4607,7 +4607,7 @@ public function groupAssignRole(int $groupId, Model\CreateRoleAssignment $reques * @param int $groupId the group in which the role assignment takes place * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\OpenApiRoleAssignment[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\GroupBatchAssignRoleBadRequestException * @throws Exception\GroupBatchAssignRoleNotFoundException @@ -4629,7 +4629,7 @@ public function groupBatchAssignRole(int $groupId, Model\BatchCreateRoleAssignme * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\OpenApiRoleAssignment[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListRoleAssignmentsBadRequestException * @throws Exception\ListRoleAssignmentsNotFoundException @@ -4661,7 +4661,7 @@ public function assignRole(int $workspaceId, Model\CreateRoleAssignment $request * @param int $workspaceId the workspace in which the role assignment takes place * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\OpenApiRoleAssignment[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\BatchAssignRoleBadRequestException * @throws Exception\BatchAssignRoleNotFoundException @@ -4846,7 +4846,7 @@ public function restoreSnapshot(int $snapshotId, string $fetch = self::FETCH_OBJ * @param int $applicationId application ID for which to list snapshots * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\Snapshot[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\Snapshot[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListSnapshotsBadRequestException * @throws Exception\ListSnapshotsNotFoundException @@ -5027,7 +5027,7 @@ public function updateTeam(string $teamId, Model\Team $requestBody, array $heade * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\TeamSubjectResponse[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListTeamSubjectsBadRequestException */ @@ -5109,7 +5109,7 @@ public function getSubject(int $subjectId, string $teamId, string $fetch = self: * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\TeamResponse[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\TeamResponse[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\GroupListTeamsNotFoundException */ @@ -5154,7 +5154,7 @@ public function groupCreateTeam(string $groupId, Model\Team $requestBody, array * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\TeamResponse[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\TeamResponse[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\WorkspaceListTeamsNotFoundException */ @@ -5186,7 +5186,7 @@ public function workspaceCreateTeam(string $workspaceId, Model\Team $requestBody /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\TemplateCategories[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\TemplateCategories[]|\Psr\Http\Message\ResponseInterface|null */ public function listTemplates(string $fetch = self::FETCH_OBJECT) { @@ -5764,7 +5764,7 @@ public function verifyEmail(Model\VerifyEmailAddress $requestBody, string $fetch /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\WorkspaceUserWorkspace[]|\Psr\Http\Message\ResponseInterface|null */ public function listWorkspaces(string $fetch = self::FETCH_OBJECT) { @@ -5855,7 +5855,7 @@ public function leaveWorkspace(int $workspaceId, string $fetch = self::FETCH_OBJ * @param int $workspaceId the workspace id we want the permission object for * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\PermissionObject[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\PermissionObject[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\WorkspacePermissionsNotFoundException */ @@ -6009,7 +6009,7 @@ public function getWorkspaceInvitationByToken(string $token, string $fetch = sel * @param int $workspaceId returns only invitations that are in the workspace related to the provided value * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\WorkspaceInvitation[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListWorkspaceInvitationsBadRequestException * @throws Exception\ListWorkspaceInvitationsNotFoundException @@ -6097,7 +6097,7 @@ public function updateWorkspaceUser(int $workspaceUserId, ?Model\PatchedUpdateWo * * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * - * @return \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData[]|\Psr\Http\Message\ResponseInterface|null + * @return Model\ListWorkspaceUsersWithMemberData[]|\Psr\Http\Message\ResponseInterface|null * * @throws Exception\ListWorkspaceUsersBadRequestException * @throws Exception\ListWorkspaceUsersNotFoundException diff --git a/generated/Normalizer/AIFieldCreateFieldNormalizer.php b/generated/Normalizer/AIFieldCreateFieldNormalizer.php index 0ba7d83..b453c92 100644 --- a/generated/Normalizer/AIFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/AIFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,225 +20,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AIFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AIFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AIFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType($data['ai_generative_ai_type']); - unset($data['ai_generative_ai_type']); - } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType(null); - } - if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); - unset($data['ai_generative_ai_model']); - } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel(null); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { - $object->setAiFileFieldId($data['ai_file_field_id']); - unset($data['ai_file_field_id']); - } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { - $object->setAiFileFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AIFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('aiGenerativeAiType') && null !== $object->getAiGenerativeAiType()) { - $data['ai_generative_ai_type'] = $object->getAiGenerativeAiType(); - } - if ($object->isInitialized('aiGenerativeAiModel') && null !== $object->getAiGenerativeAiModel()) { - $data['ai_generative_ai_model'] = $object->getAiGenerativeAiModel(); - } - if ($object->isInitialized('aiPrompt') && null !== $object->getAiPrompt()) { - $data['ai_prompt'] = $object->getAiPrompt(); - } - if ($object->isInitialized('aiFileFieldId') && null !== $object->getAiFileFieldId()) { - $data['ai_file_field_id'] = $object->getAiFileFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { + $object->setAiGenerativeAiType($data['ai_generative_ai_type']); + unset($data['ai_generative_ai_type']); + } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { + $object->setAiGenerativeAiType(null); + } + if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { + $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); + unset($data['ai_generative_ai_model']); + } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { + $object->setAiGenerativeAiModel(null); + } + if (\array_key_exists('ai_prompt', $data)) { + $object->setAiPrompt($data['ai_prompt']); + unset($data['ai_prompt']); + } + if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { + $object->setAiFileFieldId($data['ai_file_field_id']); + unset($data['ai_file_field_id']); + } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { + $object->setAiFileFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => false]; - } + return $object; } -} else { - class AIFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class === get_class($data); + if ($data->isInitialized('aiGenerativeAiType') && null !== $data->getAiGenerativeAiType()) { + $dataArray['ai_generative_ai_type'] = $data->getAiGenerativeAiType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AIFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType($data['ai_generative_ai_type']); - unset($data['ai_generative_ai_type']); - } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType(null); - } - if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); - unset($data['ai_generative_ai_model']); - } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel(null); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { - $object->setAiFileFieldId($data['ai_file_field_id']); - unset($data['ai_file_field_id']); - } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { - $object->setAiFileFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('aiGenerativeAiModel') && null !== $data->getAiGenerativeAiModel()) { + $dataArray['ai_generative_ai_model'] = $data->getAiGenerativeAiModel(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('aiGenerativeAiType') && null !== $object->getAiGenerativeAiType()) { - $data['ai_generative_ai_type'] = $object->getAiGenerativeAiType(); - } - if ($object->isInitialized('aiGenerativeAiModel') && null !== $object->getAiGenerativeAiModel()) { - $data['ai_generative_ai_model'] = $object->getAiGenerativeAiModel(); - } - if ($object->isInitialized('aiPrompt') && null !== $object->getAiPrompt()) { - $data['ai_prompt'] = $object->getAiPrompt(); - } - if ($object->isInitialized('aiFileFieldId') && null !== $object->getAiFileFieldId()) { - $data['ai_file_field_id'] = $object->getAiFileFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('aiPrompt') && null !== $data->getAiPrompt()) { + $dataArray['ai_prompt'] = $data->getAiPrompt(); + } + if ($data->isInitialized('aiFileFieldId') && null !== $data->getAiFileFieldId()) { + $dataArray['ai_file_field_id'] = $data->getAiFileFieldId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/AIFieldFieldNormalizer.php b/generated/Normalizer/AIFieldFieldNormalizer.php index db88079..69f5ddb 100644 --- a/generated/Normalizer/AIFieldFieldNormalizer.php +++ b/generated/Normalizer/AIFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,271 +20,140 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AIFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AIFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AIFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AIFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AIFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType($data['ai_generative_ai_type']); - unset($data['ai_generative_ai_type']); - } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType(null); - } - if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); - unset($data['ai_generative_ai_model']); - } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel(null); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { - $object->setAiFileFieldId($data['ai_file_field_id']); - unset($data['ai_file_field_id']); - } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { - $object->setAiFileFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AIFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('aiGenerativeAiType') && null !== $object->getAiGenerativeAiType()) { - $data['ai_generative_ai_type'] = $object->getAiGenerativeAiType(); - } - if ($object->isInitialized('aiGenerativeAiModel') && null !== $object->getAiGenerativeAiModel()) { - $data['ai_generative_ai_model'] = $object->getAiGenerativeAiModel(); - } - if ($object->isInitialized('aiPrompt') && null !== $object->getAiPrompt()) { - $data['ai_prompt'] = $object->getAiPrompt(); - } - if ($object->isInitialized('aiFileFieldId') && null !== $object->getAiFileFieldId()) { - $data['ai_file_field_id'] = $object->getAiFileFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { + $object->setAiGenerativeAiType($data['ai_generative_ai_type']); + unset($data['ai_generative_ai_type']); + } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { + $object->setAiGenerativeAiType(null); + } + if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { + $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); + unset($data['ai_generative_ai_model']); + } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { + $object->setAiGenerativeAiModel(null); + } + if (\array_key_exists('ai_prompt', $data)) { + $object->setAiPrompt($data['ai_prompt']); + unset($data['ai_prompt']); + } + if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { + $object->setAiFileFieldId($data['ai_file_field_id']); + unset($data['ai_file_field_id']); + } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { + $object->setAiFileFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AIFieldField::class => false]; - } + return $object; } -} else { - class AIFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AIFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AIFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType($data['ai_generative_ai_type']); - unset($data['ai_generative_ai_type']); - } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType(null); - } - if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); - unset($data['ai_generative_ai_model']); - } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel(null); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { - $object->setAiFileFieldId($data['ai_file_field_id']); - unset($data['ai_file_field_id']); - } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { - $object->setAiFileFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('aiGenerativeAiType') && null !== $data->getAiGenerativeAiType()) { + $dataArray['ai_generative_ai_type'] = $data->getAiGenerativeAiType(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('aiGenerativeAiType') && null !== $object->getAiGenerativeAiType()) { - $data['ai_generative_ai_type'] = $object->getAiGenerativeAiType(); - } - if ($object->isInitialized('aiGenerativeAiModel') && null !== $object->getAiGenerativeAiModel()) { - $data['ai_generative_ai_model'] = $object->getAiGenerativeAiModel(); - } - if ($object->isInitialized('aiPrompt') && null !== $object->getAiPrompt()) { - $data['ai_prompt'] = $object->getAiPrompt(); - } - if ($object->isInitialized('aiFileFieldId') && null !== $object->getAiFileFieldId()) { - $data['ai_file_field_id'] = $object->getAiFileFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('aiGenerativeAiModel') && null !== $data->getAiGenerativeAiModel()) { + $dataArray['ai_generative_ai_model'] = $data->getAiGenerativeAiModel(); + } + if ($data->isInitialized('aiPrompt') && null !== $data->getAiPrompt()) { + $dataArray['ai_prompt'] = $data->getAiPrompt(); + } + if ($data->isInitialized('aiFileFieldId') && null !== $data->getAiFileFieldId()) { + $dataArray['ai_file_field_id'] = $data->getAiFileFieldId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AIFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AIFieldField::class => false]; } } diff --git a/generated/Normalizer/AIFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/AIFieldFieldSerializerWithRelatedFieldsNormalizer.php index 383feb9..b0402a9 100644 --- a/generated/Normalizer/AIFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/AIFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,287 +20,148 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AIFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AIFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType($data['ai_generative_ai_type']); - unset($data['ai_generative_ai_type']); - } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType(null); - } - if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); - unset($data['ai_generative_ai_model']); - } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel(null); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { - $object->setAiFileFieldId($data['ai_file_field_id']); - unset($data['ai_file_field_id']); - } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { - $object->setAiFileFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('aiGenerativeAiType') && null !== $object->getAiGenerativeAiType()) { - $data['ai_generative_ai_type'] = $object->getAiGenerativeAiType(); - } - if ($object->isInitialized('aiGenerativeAiModel') && null !== $object->getAiGenerativeAiModel()) { - $data['ai_generative_ai_model'] = $object->getAiGenerativeAiModel(); - } - if ($object->isInitialized('aiPrompt') && null !== $object->getAiPrompt()) { - $data['ai_prompt'] = $object->getAiPrompt(); - } - if ($object->isInitialized('aiFileFieldId') && null !== $object->getAiFileFieldId()) { - $data['ai_file_field_id'] = $object->getAiFileFieldId(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { + $object->setAiGenerativeAiType($data['ai_generative_ai_type']); + unset($data['ai_generative_ai_type']); + } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { + $object->setAiGenerativeAiType(null); + } + if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { + $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); + unset($data['ai_generative_ai_model']); + } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { + $object->setAiGenerativeAiModel(null); + } + if (\array_key_exists('ai_prompt', $data)) { + $object->setAiPrompt($data['ai_prompt']); + unset($data['ai_prompt']); + } + if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { + $object->setAiFileFieldId($data['ai_file_field_id']); + unset($data['ai_file_field_id']); + } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { + $object->setAiFileFieldId(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class AIFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType($data['ai_generative_ai_type']); - unset($data['ai_generative_ai_type']); - } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType(null); - } - if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); - unset($data['ai_generative_ai_model']); - } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel(null); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { - $object->setAiFileFieldId($data['ai_file_field_id']); - unset($data['ai_file_field_id']); - } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { - $object->setAiFileFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('aiGenerativeAiType') && null !== $data->getAiGenerativeAiType()) { + $dataArray['ai_generative_ai_type'] = $data->getAiGenerativeAiType(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('aiGenerativeAiType') && null !== $object->getAiGenerativeAiType()) { - $data['ai_generative_ai_type'] = $object->getAiGenerativeAiType(); - } - if ($object->isInitialized('aiGenerativeAiModel') && null !== $object->getAiGenerativeAiModel()) { - $data['ai_generative_ai_model'] = $object->getAiGenerativeAiModel(); - } - if ($object->isInitialized('aiPrompt') && null !== $object->getAiPrompt()) { - $data['ai_prompt'] = $object->getAiPrompt(); - } - if ($object->isInitialized('aiFileFieldId') && null !== $object->getAiFileFieldId()) { - $data['ai_file_field_id'] = $object->getAiFileFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('aiGenerativeAiModel') && null !== $data->getAiGenerativeAiModel()) { + $dataArray['ai_generative_ai_model'] = $data->getAiGenerativeAiModel(); + } + if ($data->isInitialized('aiPrompt') && null !== $data->getAiPrompt()) { + $dataArray['ai_prompt'] = $data->getAiPrompt(); + } + if ($data->isInitialized('aiFileFieldId') && null !== $data->getAiFileFieldId()) { + $dataArray['ai_file_field_id'] = $data->getAiFileFieldId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/AIFieldUpdateFieldNormalizer.php b/generated/Normalizer/AIFieldUpdateFieldNormalizer.php index cf658f8..0a68df1 100644 --- a/generated/Normalizer/AIFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/AIFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,233 +20,115 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AIFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AIFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType($data['ai_generative_ai_type']); - unset($data['ai_generative_ai_type']); - } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType(null); - } - if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); - unset($data['ai_generative_ai_model']); - } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel(null); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { - $object->setAiFileFieldId($data['ai_file_field_id']); - unset($data['ai_file_field_id']); - } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { - $object->setAiFileFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('aiGenerativeAiType') && null !== $object->getAiGenerativeAiType()) { - $data['ai_generative_ai_type'] = $object->getAiGenerativeAiType(); - } - if ($object->isInitialized('aiGenerativeAiModel') && null !== $object->getAiGenerativeAiModel()) { - $data['ai_generative_ai_model'] = $object->getAiGenerativeAiModel(); - } - if ($object->isInitialized('aiPrompt') && null !== $object->getAiPrompt()) { - $data['ai_prompt'] = $object->getAiPrompt(); - } - if ($object->isInitialized('aiFileFieldId') && null !== $object->getAiFileFieldId()) { - $data['ai_file_field_id'] = $object->getAiFileFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { + $object->setAiGenerativeAiType($data['ai_generative_ai_type']); + unset($data['ai_generative_ai_type']); + } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { + $object->setAiGenerativeAiType(null); + } + if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { + $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); + unset($data['ai_generative_ai_model']); + } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { + $object->setAiGenerativeAiModel(null); + } + if (\array_key_exists('ai_prompt', $data)) { + $object->setAiPrompt($data['ai_prompt']); + unset($data['ai_prompt']); + } + if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { + $object->setAiFileFieldId($data['ai_file_field_id']); + unset($data['ai_file_field_id']); + } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { + $object->setAiFileFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => false]; - } + return $object; } -} else { - class AIFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('ai_generative_ai_type', $data) && null !== $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType($data['ai_generative_ai_type']); - unset($data['ai_generative_ai_type']); - } elseif (\array_key_exists('ai_generative_ai_type', $data) && null === $data['ai_generative_ai_type']) { - $object->setAiGenerativeAiType(null); - } - if (\array_key_exists('ai_generative_ai_model', $data) && null !== $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel($data['ai_generative_ai_model']); - unset($data['ai_generative_ai_model']); - } elseif (\array_key_exists('ai_generative_ai_model', $data) && null === $data['ai_generative_ai_model']) { - $object->setAiGenerativeAiModel(null); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - if (\array_key_exists('ai_file_field_id', $data) && null !== $data['ai_file_field_id']) { - $object->setAiFileFieldId($data['ai_file_field_id']); - unset($data['ai_file_field_id']); - } elseif (\array_key_exists('ai_file_field_id', $data) && null === $data['ai_file_field_id']) { - $object->setAiFileFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('aiGenerativeAiType') && null !== $object->getAiGenerativeAiType()) { - $data['ai_generative_ai_type'] = $object->getAiGenerativeAiType(); - } - if ($object->isInitialized('aiGenerativeAiModel') && null !== $object->getAiGenerativeAiModel()) { - $data['ai_generative_ai_model'] = $object->getAiGenerativeAiModel(); - } - if ($object->isInitialized('aiPrompt') && null !== $object->getAiPrompt()) { - $data['ai_prompt'] = $object->getAiPrompt(); - } - if ($object->isInitialized('aiFileFieldId') && null !== $object->getAiFileFieldId()) { - $data['ai_file_field_id'] = $object->getAiFileFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('aiGenerativeAiType') && null !== $data->getAiGenerativeAiType()) { + $dataArray['ai_generative_ai_type'] = $data->getAiGenerativeAiType(); + } + if ($data->isInitialized('aiGenerativeAiModel') && null !== $data->getAiGenerativeAiModel()) { + $dataArray['ai_generative_ai_model'] = $data->getAiGenerativeAiModel(); + } + if ($data->isInitialized('aiPrompt') && null !== $data->getAiPrompt()) { + $dataArray['ai_prompt'] = $data->getAiPrompt(); + } + if ($data->isInitialized('aiFileFieldId') && null !== $data->getAiFileFieldId()) { + $dataArray['ai_file_field_id'] = $data->getAiFileFieldId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/AccountNormalizer.php b/generated/Normalizer/AccountNormalizer.php index 14d869a..5e017bb 100644 --- a/generated/Normalizer/AccountNormalizer.php +++ b/generated/Normalizer/AccountNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,89 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AccountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AccountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Account::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Account::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Account::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Account::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Account(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - if (\array_key_exists('email_notification_frequency', $data)) { - $object->setEmailNotificationFrequency($data['email_notification_frequency']); - unset($data['email_notification_frequency']); - } - if (\array_key_exists('completed_onboarding', $data)) { - $object->setCompletedOnboarding($data['completed_onboarding']); - unset($data['completed_onboarding']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Account(); + if (\array_key_exists('completed_onboarding', $data) && \is_int($data['completed_onboarding'])) { + $data['completed_onboarding'] = (bool) $data['completed_onboarding']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - if ($object->isInitialized('emailNotificationFrequency') && null !== $object->getEmailNotificationFrequency()) { - $data['email_notification_frequency'] = $object->getEmailNotificationFrequency(); - } - if ($object->isInitialized('completedOnboarding') && null !== $object->getCompletedOnboarding()) { - $data['completed_onboarding'] = $object->getCompletedOnboarding(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + if (\array_key_exists('email_notification_frequency', $data)) { + $object->setEmailNotificationFrequency($data['email_notification_frequency']); + unset($data['email_notification_frequency']); + } + if (\array_key_exists('completed_onboarding', $data)) { + $object->setCompletedOnboarding($data['completed_onboarding']); + unset($data['completed_onboarding']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Account::class => false]; - } + return $object; } -} else { - class AccountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Account::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Account::class === get_class($data); + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Account(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - if (\array_key_exists('email_notification_frequency', $data)) { - $object->setEmailNotificationFrequency($data['email_notification_frequency']); - unset($data['email_notification_frequency']); - } - if (\array_key_exists('completed_onboarding', $data)) { - $object->setCompletedOnboarding($data['completed_onboarding']); - unset($data['completed_onboarding']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('emailNotificationFrequency') && null !== $data->getEmailNotificationFrequency()) { + $dataArray['email_notification_frequency'] = $data->getEmailNotificationFrequency(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - if ($object->isInitialized('emailNotificationFrequency') && null !== $object->getEmailNotificationFrequency()) { - $data['email_notification_frequency'] = $object->getEmailNotificationFrequency(); - } - if ($object->isInitialized('completedOnboarding') && null !== $object->getCompletedOnboarding()) { - $data['completed_onboarding'] = $object->getCompletedOnboarding(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('completedOnboarding') && null !== $data->getCompletedOnboarding()) { + $dataArray['completed_onboarding'] = $data->getCompletedOnboarding(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Account::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Account::class => false]; } } diff --git a/generated/Normalizer/ActionScopesNormalizer.php b/generated/Normalizer/ActionScopesNormalizer.php index e0a5900..59ce7b7 100644 --- a/generated/Normalizer/ActionScopesNormalizer.php +++ b/generated/Normalizer/ActionScopesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,245 +20,124 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ActionScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ActionScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ActionScopes::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ActionScopes::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ActionScopes::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ActionScopes::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ActionScopes(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('root', $data) && null !== $data['root']) { - $object->setRoot($data['root']); - unset($data['root']); - } elseif (\array_key_exists('root', $data) && null === $data['root']) { - $object->setRoot(null); - } - if (\array_key_exists('workspace', $data) && null !== $data['workspace']) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } elseif (\array_key_exists('workspace', $data) && null === $data['workspace']) { - $object->setWorkspace(null); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - if (\array_key_exists('application', $data) && null !== $data['application']) { - $object->setApplication($data['application']); - unset($data['application']); - } elseif (\array_key_exists('application', $data) && null === $data['application']) { - $object->setApplication(null); - } - if (\array_key_exists('table', $data) && null !== $data['table']) { - $object->setTable($data['table']); - unset($data['table']); - } elseif (\array_key_exists('table', $data) && null === $data['table']) { - $object->setTable(null); - } - if (\array_key_exists('view', $data) && null !== $data['view']) { - $object->setView($data['view']); - unset($data['view']); - } elseif (\array_key_exists('view', $data) && null === $data['view']) { - $object->setView(null); - } - if (\array_key_exists('teams_in_workspace', $data) && null !== $data['teams_in_workspace']) { - $object->setTeamsInWorkspace($data['teams_in_workspace']); - unset($data['teams_in_workspace']); - } elseif (\array_key_exists('teams_in_workspace', $data) && null === $data['teams_in_workspace']) { - $object->setTeamsInWorkspace(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ActionScopes(); + if (\array_key_exists('root', $data) && \is_int($data['root'])) { + $data['root'] = (bool) $data['root']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('root') && null !== $object->getRoot()) { - $data['root'] = $object->getRoot(); - } - if ($object->isInitialized('workspace') && null !== $object->getWorkspace()) { - $data['workspace'] = $object->getWorkspace(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - if ($object->isInitialized('application') && null !== $object->getApplication()) { - $data['application'] = $object->getApplication(); - } - if ($object->isInitialized('table') && null !== $object->getTable()) { - $data['table'] = $object->getTable(); - } - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('teamsInWorkspace') && null !== $object->getTeamsInWorkspace()) { - $data['teams_in_workspace'] = $object->getTeamsInWorkspace(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('root', $data) && null !== $data['root']) { + $object->setRoot($data['root']); + unset($data['root']); + } elseif (\array_key_exists('root', $data) && null === $data['root']) { + $object->setRoot(null); + } + if (\array_key_exists('workspace', $data) && null !== $data['workspace']) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); + } elseif (\array_key_exists('workspace', $data) && null === $data['workspace']) { + $object->setWorkspace(null); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $object->setGroup($data['group']); + unset($data['group']); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + if (\array_key_exists('application', $data) && null !== $data['application']) { + $object->setApplication($data['application']); + unset($data['application']); + } elseif (\array_key_exists('application', $data) && null === $data['application']) { + $object->setApplication(null); + } + if (\array_key_exists('table', $data) && null !== $data['table']) { + $object->setTable($data['table']); + unset($data['table']); + } elseif (\array_key_exists('table', $data) && null === $data['table']) { + $object->setTable(null); + } + if (\array_key_exists('view', $data) && null !== $data['view']) { + $object->setView($data['view']); + unset($data['view']); + } elseif (\array_key_exists('view', $data) && null === $data['view']) { + $object->setView(null); + } + if (\array_key_exists('teams_in_workspace', $data) && null !== $data['teams_in_workspace']) { + $object->setTeamsInWorkspace($data['teams_in_workspace']); + unset($data['teams_in_workspace']); + } elseif (\array_key_exists('teams_in_workspace', $data) && null === $data['teams_in_workspace']) { + $object->setTeamsInWorkspace(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ActionScopes::class => false]; - } + return $object; } -} else { - class ActionScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ActionScopes::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('root') && null !== $data->getRoot()) { + $dataArray['root'] = $data->getRoot(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ActionScopes::class === get_class($data); + if ($data->isInitialized('workspace') && null !== $data->getWorkspace()) { + $dataArray['workspace'] = $data->getWorkspace(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ActionScopes(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('root', $data) && null !== $data['root']) { - $object->setRoot($data['root']); - unset($data['root']); - } elseif (\array_key_exists('root', $data) && null === $data['root']) { - $object->setRoot(null); - } - if (\array_key_exists('workspace', $data) && null !== $data['workspace']) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } elseif (\array_key_exists('workspace', $data) && null === $data['workspace']) { - $object->setWorkspace(null); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - if (\array_key_exists('application', $data) && null !== $data['application']) { - $object->setApplication($data['application']); - unset($data['application']); - } elseif (\array_key_exists('application', $data) && null === $data['application']) { - $object->setApplication(null); - } - if (\array_key_exists('table', $data) && null !== $data['table']) { - $object->setTable($data['table']); - unset($data['table']); - } elseif (\array_key_exists('table', $data) && null === $data['table']) { - $object->setTable(null); - } - if (\array_key_exists('view', $data) && null !== $data['view']) { - $object->setView($data['view']); - unset($data['view']); - } elseif (\array_key_exists('view', $data) && null === $data['view']) { - $object->setView(null); - } - if (\array_key_exists('teams_in_workspace', $data) && null !== $data['teams_in_workspace']) { - $object->setTeamsInWorkspace($data['teams_in_workspace']); - unset($data['teams_in_workspace']); - } elseif (\array_key_exists('teams_in_workspace', $data) && null === $data['teams_in_workspace']) { - $object->setTeamsInWorkspace(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('group') && null !== $data->getGroup()) { + $dataArray['group'] = $data->getGroup(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('root') && null !== $object->getRoot()) { - $data['root'] = $object->getRoot(); - } - if ($object->isInitialized('workspace') && null !== $object->getWorkspace()) { - $data['workspace'] = $object->getWorkspace(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - if ($object->isInitialized('application') && null !== $object->getApplication()) { - $data['application'] = $object->getApplication(); - } - if ($object->isInitialized('table') && null !== $object->getTable()) { - $data['table'] = $object->getTable(); - } - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('teamsInWorkspace') && null !== $object->getTeamsInWorkspace()) { - $data['teams_in_workspace'] = $object->getTeamsInWorkspace(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('application') && null !== $data->getApplication()) { + $dataArray['application'] = $data->getApplication(); + } + if ($data->isInitialized('table') && null !== $data->getTable()) { + $dataArray['table'] = $data->getTable(); + } + if ($data->isInitialized('view') && null !== $data->getView()) { + $dataArray['view'] = $data->getView(); + } + if ($data->isInitialized('teamsInWorkspace') && null !== $data->getTeamsInWorkspace()) { + $dataArray['teams_in_workspace'] = $data->getTeamsInWorkspace(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ActionScopes::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ActionScopes::class => false]; } } diff --git a/generated/Normalizer/AdminDashboardNormalizer.php b/generated/Normalizer/AdminDashboardNormalizer.php index 54be02e..acaab23 100644 --- a/generated/Normalizer/AdminDashboardNormalizer.php +++ b/generated/Normalizer/AdminDashboardNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,331 +20,164 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AdminDashboardNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AdminDashboardNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AdminDashboard::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AdminDashboard::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AdminDashboard::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AdminDashboard::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AdminDashboard(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('total_users', $data)) { - $object->setTotalUsers($data['total_users']); - unset($data['total_users']); - } - if (\array_key_exists('total_groups', $data)) { - $object->setTotalGroups($data['total_groups']); - unset($data['total_groups']); - } - if (\array_key_exists('total_workspaces', $data)) { - $object->setTotalWorkspaces($data['total_workspaces']); - unset($data['total_workspaces']); - } - if (\array_key_exists('total_applications', $data)) { - $object->setTotalApplications($data['total_applications']); - unset($data['total_applications']); - } - if (\array_key_exists('new_users_last_24_hours', $data)) { - $object->setNewUsersLast24Hours($data['new_users_last_24_hours']); - unset($data['new_users_last_24_hours']); - } - if (\array_key_exists('new_users_last_7_days', $data)) { - $object->setNewUsersLast7Days($data['new_users_last_7_days']); - unset($data['new_users_last_7_days']); - } - if (\array_key_exists('new_users_last_30_days', $data)) { - $object->setNewUsersLast30Days($data['new_users_last_30_days']); - unset($data['new_users_last_30_days']); - } - if (\array_key_exists('previous_new_users_last_24_hours', $data)) { - $object->setPreviousNewUsersLast24Hours($data['previous_new_users_last_24_hours']); - unset($data['previous_new_users_last_24_hours']); - } - if (\array_key_exists('previous_new_users_last_7_days', $data)) { - $object->setPreviousNewUsersLast7Days($data['previous_new_users_last_7_days']); - unset($data['previous_new_users_last_7_days']); - } - if (\array_key_exists('previous_new_users_last_30_days', $data)) { - $object->setPreviousNewUsersLast30Days($data['previous_new_users_last_30_days']); - unset($data['previous_new_users_last_30_days']); - } - if (\array_key_exists('active_users_last_24_hours', $data)) { - $object->setActiveUsersLast24Hours($data['active_users_last_24_hours']); - unset($data['active_users_last_24_hours']); - } - if (\array_key_exists('active_users_last_7_days', $data)) { - $object->setActiveUsersLast7Days($data['active_users_last_7_days']); - unset($data['active_users_last_7_days']); - } - if (\array_key_exists('active_users_last_30_days', $data)) { - $object->setActiveUsersLast30Days($data['active_users_last_30_days']); - unset($data['active_users_last_30_days']); - } - if (\array_key_exists('previous_active_users_last_24_hours', $data)) { - $object->setPreviousActiveUsersLast24Hours($data['previous_active_users_last_24_hours']); - unset($data['previous_active_users_last_24_hours']); - } - if (\array_key_exists('previous_active_users_last_7_days', $data)) { - $object->setPreviousActiveUsersLast7Days($data['previous_active_users_last_7_days']); - unset($data['previous_active_users_last_7_days']); - } - if (\array_key_exists('previous_active_users_last_30_days', $data)) { - $object->setPreviousActiveUsersLast30Days($data['previous_active_users_last_30_days']); - unset($data['previous_active_users_last_30_days']); - } - if (\array_key_exists('new_users_per_day', $data)) { - $values = []; - foreach ($data['new_users_per_day'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class, 'json', $context); - } - $object->setNewUsersPerDay($values); - unset($data['new_users_per_day']); - } - if (\array_key_exists('active_users_per_day', $data)) { - $values_1 = []; - foreach ($data['active_users_per_day'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class, 'json', $context); - } - $object->setActiveUsersPerDay($values_1); - unset($data['active_users_per_day']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AdminDashboard(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['total_users'] = $object->getTotalUsers(); - $data['total_groups'] = $object->getTotalGroups(); - $data['total_workspaces'] = $object->getTotalWorkspaces(); - $data['total_applications'] = $object->getTotalApplications(); - $data['new_users_last_24_hours'] = $object->getNewUsersLast24Hours(); - $data['new_users_last_7_days'] = $object->getNewUsersLast7Days(); - $data['new_users_last_30_days'] = $object->getNewUsersLast30Days(); - $data['previous_new_users_last_24_hours'] = $object->getPreviousNewUsersLast24Hours(); - $data['previous_new_users_last_7_days'] = $object->getPreviousNewUsersLast7Days(); - $data['previous_new_users_last_30_days'] = $object->getPreviousNewUsersLast30Days(); - $data['active_users_last_24_hours'] = $object->getActiveUsersLast24Hours(); - $data['active_users_last_7_days'] = $object->getActiveUsersLast7Days(); - $data['active_users_last_30_days'] = $object->getActiveUsersLast30Days(); - $data['previous_active_users_last_24_hours'] = $object->getPreviousActiveUsersLast24Hours(); - $data['previous_active_users_last_7_days'] = $object->getPreviousActiveUsersLast7Days(); - $data['previous_active_users_last_30_days'] = $object->getPreviousActiveUsersLast30Days(); + if (\array_key_exists('total_users', $data)) { + $object->setTotalUsers($data['total_users']); + unset($data['total_users']); + } + if (\array_key_exists('total_groups', $data)) { + $object->setTotalGroups($data['total_groups']); + unset($data['total_groups']); + } + if (\array_key_exists('total_workspaces', $data)) { + $object->setTotalWorkspaces($data['total_workspaces']); + unset($data['total_workspaces']); + } + if (\array_key_exists('total_applications', $data)) { + $object->setTotalApplications($data['total_applications']); + unset($data['total_applications']); + } + if (\array_key_exists('new_users_last_24_hours', $data)) { + $object->setNewUsersLast24Hours($data['new_users_last_24_hours']); + unset($data['new_users_last_24_hours']); + } + if (\array_key_exists('new_users_last_7_days', $data)) { + $object->setNewUsersLast7Days($data['new_users_last_7_days']); + unset($data['new_users_last_7_days']); + } + if (\array_key_exists('new_users_last_30_days', $data)) { + $object->setNewUsersLast30Days($data['new_users_last_30_days']); + unset($data['new_users_last_30_days']); + } + if (\array_key_exists('previous_new_users_last_24_hours', $data)) { + $object->setPreviousNewUsersLast24Hours($data['previous_new_users_last_24_hours']); + unset($data['previous_new_users_last_24_hours']); + } + if (\array_key_exists('previous_new_users_last_7_days', $data)) { + $object->setPreviousNewUsersLast7Days($data['previous_new_users_last_7_days']); + unset($data['previous_new_users_last_7_days']); + } + if (\array_key_exists('previous_new_users_last_30_days', $data)) { + $object->setPreviousNewUsersLast30Days($data['previous_new_users_last_30_days']); + unset($data['previous_new_users_last_30_days']); + } + if (\array_key_exists('active_users_last_24_hours', $data)) { + $object->setActiveUsersLast24Hours($data['active_users_last_24_hours']); + unset($data['active_users_last_24_hours']); + } + if (\array_key_exists('active_users_last_7_days', $data)) { + $object->setActiveUsersLast7Days($data['active_users_last_7_days']); + unset($data['active_users_last_7_days']); + } + if (\array_key_exists('active_users_last_30_days', $data)) { + $object->setActiveUsersLast30Days($data['active_users_last_30_days']); + unset($data['active_users_last_30_days']); + } + if (\array_key_exists('previous_active_users_last_24_hours', $data)) { + $object->setPreviousActiveUsersLast24Hours($data['previous_active_users_last_24_hours']); + unset($data['previous_active_users_last_24_hours']); + } + if (\array_key_exists('previous_active_users_last_7_days', $data)) { + $object->setPreviousActiveUsersLast7Days($data['previous_active_users_last_7_days']); + unset($data['previous_active_users_last_7_days']); + } + if (\array_key_exists('previous_active_users_last_30_days', $data)) { + $object->setPreviousActiveUsersLast30Days($data['previous_active_users_last_30_days']); + unset($data['previous_active_users_last_30_days']); + } + if (\array_key_exists('new_users_per_day', $data)) { $values = []; - foreach ($object->getNewUsersPerDay() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['new_users_per_day'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class, 'json', $context); } - $data['new_users_per_day'] = $values; + $object->setNewUsersPerDay($values); + unset($data['new_users_per_day']); + } + if (\array_key_exists('active_users_per_day', $data)) { $values_1 = []; - foreach ($object->getActiveUsersPerDay() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['active_users_per_day'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class, 'json', $context); } - $data['active_users_per_day'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setActiveUsersPerDay($values_1); + unset($data['active_users_per_day']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AdminDashboard::class => false]; - } + return $object; } -} else { - class AdminDashboardNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AdminDashboard::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['total_users'] = $data->getTotalUsers(); + $dataArray['total_groups'] = $data->getTotalGroups(); + $dataArray['total_workspaces'] = $data->getTotalWorkspaces(); + $dataArray['total_applications'] = $data->getTotalApplications(); + $dataArray['new_users_last_24_hours'] = $data->getNewUsersLast24Hours(); + $dataArray['new_users_last_7_days'] = $data->getNewUsersLast7Days(); + $dataArray['new_users_last_30_days'] = $data->getNewUsersLast30Days(); + $dataArray['previous_new_users_last_24_hours'] = $data->getPreviousNewUsersLast24Hours(); + $dataArray['previous_new_users_last_7_days'] = $data->getPreviousNewUsersLast7Days(); + $dataArray['previous_new_users_last_30_days'] = $data->getPreviousNewUsersLast30Days(); + $dataArray['active_users_last_24_hours'] = $data->getActiveUsersLast24Hours(); + $dataArray['active_users_last_7_days'] = $data->getActiveUsersLast7Days(); + $dataArray['active_users_last_30_days'] = $data->getActiveUsersLast30Days(); + $dataArray['previous_active_users_last_24_hours'] = $data->getPreviousActiveUsersLast24Hours(); + $dataArray['previous_active_users_last_7_days'] = $data->getPreviousActiveUsersLast7Days(); + $dataArray['previous_active_users_last_30_days'] = $data->getPreviousActiveUsersLast30Days(); + $values = []; + foreach ($data->getNewUsersPerDay() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AdminDashboard::class === get_class($data); + $dataArray['new_users_per_day'] = $values; + $values_1 = []; + foreach ($data->getActiveUsersPerDay() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AdminDashboard(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('total_users', $data)) { - $object->setTotalUsers($data['total_users']); - unset($data['total_users']); - } - if (\array_key_exists('total_groups', $data)) { - $object->setTotalGroups($data['total_groups']); - unset($data['total_groups']); - } - if (\array_key_exists('total_workspaces', $data)) { - $object->setTotalWorkspaces($data['total_workspaces']); - unset($data['total_workspaces']); - } - if (\array_key_exists('total_applications', $data)) { - $object->setTotalApplications($data['total_applications']); - unset($data['total_applications']); - } - if (\array_key_exists('new_users_last_24_hours', $data)) { - $object->setNewUsersLast24Hours($data['new_users_last_24_hours']); - unset($data['new_users_last_24_hours']); - } - if (\array_key_exists('new_users_last_7_days', $data)) { - $object->setNewUsersLast7Days($data['new_users_last_7_days']); - unset($data['new_users_last_7_days']); - } - if (\array_key_exists('new_users_last_30_days', $data)) { - $object->setNewUsersLast30Days($data['new_users_last_30_days']); - unset($data['new_users_last_30_days']); - } - if (\array_key_exists('previous_new_users_last_24_hours', $data)) { - $object->setPreviousNewUsersLast24Hours($data['previous_new_users_last_24_hours']); - unset($data['previous_new_users_last_24_hours']); - } - if (\array_key_exists('previous_new_users_last_7_days', $data)) { - $object->setPreviousNewUsersLast7Days($data['previous_new_users_last_7_days']); - unset($data['previous_new_users_last_7_days']); + $dataArray['active_users_per_day'] = $values_1; + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - if (\array_key_exists('previous_new_users_last_30_days', $data)) { - $object->setPreviousNewUsersLast30Days($data['previous_new_users_last_30_days']); - unset($data['previous_new_users_last_30_days']); - } - if (\array_key_exists('active_users_last_24_hours', $data)) { - $object->setActiveUsersLast24Hours($data['active_users_last_24_hours']); - unset($data['active_users_last_24_hours']); - } - if (\array_key_exists('active_users_last_7_days', $data)) { - $object->setActiveUsersLast7Days($data['active_users_last_7_days']); - unset($data['active_users_last_7_days']); - } - if (\array_key_exists('active_users_last_30_days', $data)) { - $object->setActiveUsersLast30Days($data['active_users_last_30_days']); - unset($data['active_users_last_30_days']); - } - if (\array_key_exists('previous_active_users_last_24_hours', $data)) { - $object->setPreviousActiveUsersLast24Hours($data['previous_active_users_last_24_hours']); - unset($data['previous_active_users_last_24_hours']); - } - if (\array_key_exists('previous_active_users_last_7_days', $data)) { - $object->setPreviousActiveUsersLast7Days($data['previous_active_users_last_7_days']); - unset($data['previous_active_users_last_7_days']); - } - if (\array_key_exists('previous_active_users_last_30_days', $data)) { - $object->setPreviousActiveUsersLast30Days($data['previous_active_users_last_30_days']); - unset($data['previous_active_users_last_30_days']); - } - if (\array_key_exists('new_users_per_day', $data)) { - $values = []; - foreach ($data['new_users_per_day'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class, 'json', $context); - } - $object->setNewUsersPerDay($values); - unset($data['new_users_per_day']); - } - if (\array_key_exists('active_users_per_day', $data)) { - $values_1 = []; - foreach ($data['active_users_per_day'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class, 'json', $context); - } - $object->setActiveUsersPerDay($values_1); - unset($data['active_users_per_day']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['total_users'] = $object->getTotalUsers(); - $data['total_groups'] = $object->getTotalGroups(); - $data['total_workspaces'] = $object->getTotalWorkspaces(); - $data['total_applications'] = $object->getTotalApplications(); - $data['new_users_last_24_hours'] = $object->getNewUsersLast24Hours(); - $data['new_users_last_7_days'] = $object->getNewUsersLast7Days(); - $data['new_users_last_30_days'] = $object->getNewUsersLast30Days(); - $data['previous_new_users_last_24_hours'] = $object->getPreviousNewUsersLast24Hours(); - $data['previous_new_users_last_7_days'] = $object->getPreviousNewUsersLast7Days(); - $data['previous_new_users_last_30_days'] = $object->getPreviousNewUsersLast30Days(); - $data['active_users_last_24_hours'] = $object->getActiveUsersLast24Hours(); - $data['active_users_last_7_days'] = $object->getActiveUsersLast7Days(); - $data['active_users_last_30_days'] = $object->getActiveUsersLast30Days(); - $data['previous_active_users_last_24_hours'] = $object->getPreviousActiveUsersLast24Hours(); - $data['previous_active_users_last_7_days'] = $object->getPreviousActiveUsersLast7Days(); - $data['previous_active_users_last_30_days'] = $object->getPreviousActiveUsersLast30Days(); - $values = []; - foreach ($object->getNewUsersPerDay() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['new_users_per_day'] = $values; - $values_1 = []; - foreach ($object->getActiveUsersPerDay() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['active_users_per_day'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AdminDashboard::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AdminDashboard::class => false]; } } diff --git a/generated/Normalizer/AdminDashboardPerDayNormalizer.php b/generated/Normalizer/AdminDashboardPerDayNormalizer.php index 4a5e20a..abe7a86 100644 --- a/generated/Normalizer/AdminDashboardPerDayNormalizer.php +++ b/generated/Normalizer/AdminDashboardPerDayNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AdminDashboardPerDayNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AdminDashboardPerDayNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('date', $data)) { - $object->setDate(\DateTime::createFromFormat('Y-m-d', $data['date'])->setTime(0, 0, 0)); - unset($data['date']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['date'] = $object->getDate()?->format('Y-m-d'); - $data['count'] = $object->getCount(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('date', $data)) { + $object->setDate(\DateTime::createFromFormat('Y-m-d', $data['date'])->setTime(0, 0, 0)); + unset($data['date']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => false]; + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); } - } -} else { - class AdminDashboardPerDayNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('date', $data)) { - $object->setDate(\DateTime::createFromFormat('Y-m-d', $data['date'])->setTime(0, 0, 0)); - unset($data['date']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['date'] = $data->getDate()?->format('Y-m-d'); + $dataArray['count'] = $data->getCount(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['date'] = $object->getDate()?->format('Y-m-d'); - $data['count'] = $object->getCount(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => false]; } } diff --git a/generated/Normalizer/AirtableImportJobCreateJobNormalizer.php b/generated/Normalizer/AirtableImportJobCreateJobNormalizer.php index 0b96745..609efd0 100644 --- a/generated/Normalizer/AirtableImportJobCreateJobNormalizer.php +++ b/generated/Normalizer/AirtableImportJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,167 +20,82 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AirtableImportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AirtableImportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data)) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } - if (\array_key_exists('airtable_share_url', $data)) { - $object->setAirtableShareUrl($data['airtable_share_url']); - unset($data['airtable_share_url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('groupId') && null !== $object->getGroupId()) { - $data['group_id'] = $object->getGroupId(); - } - if ($object->isInitialized('workspaceId') && null !== $object->getWorkspaceId()) { - $data['workspace_id'] = $object->getWorkspaceId(); - } - $data['airtable_share_url'] = $object->getAirtableShareUrl(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('group_id', $data)) { + $object->setGroupId($data['group_id']); + unset($data['group_id']); + } + if (\array_key_exists('workspace_id', $data)) { + $object->setWorkspaceId($data['workspace_id']); + unset($data['workspace_id']); + } + if (\array_key_exists('airtable_share_url', $data)) { + $object->setAirtableShareUrl($data['airtable_share_url']); + unset($data['airtable_share_url']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => false]; - } + return $object; } -} else { - class AirtableImportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('groupId') && null !== $data->getGroupId()) { + $dataArray['group_id'] = $data->getGroupId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class === get_class($data); + if ($data->isInitialized('workspaceId') && null !== $data->getWorkspaceId()) { + $dataArray['workspace_id'] = $data->getWorkspaceId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data)) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } - if (\array_key_exists('airtable_share_url', $data)) { - $object->setAirtableShareUrl($data['airtable_share_url']); - unset($data['airtable_share_url']); + $dataArray['airtable_share_url'] = $data->getAirtableShareUrl(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('groupId') && null !== $object->getGroupId()) { - $data['group_id'] = $object->getGroupId(); - } - if ($object->isInitialized('workspaceId') && null !== $object->getWorkspaceId()) { - $data['workspace_id'] = $object->getWorkspaceId(); - } - $data['airtable_share_url'] = $object->getAirtableShareUrl(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/AirtableImportJobJobNormalizer.php b/generated/Normalizer/AirtableImportJobJobNormalizer.php index 22ced74..2161d06 100644 --- a/generated/Normalizer/AirtableImportJobJobNormalizer.php +++ b/generated/Normalizer/AirtableImportJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,209 +20,103 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AirtableImportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AirtableImportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data)) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } - if (\array_key_exists('database', $data)) { - $object->setDatabase($data['database']); - unset($data['database']); - } - if (\array_key_exists('airtable_share_id', $data)) { - $object->setAirtableShareId($data['airtable_share_id']); - unset($data['airtable_share_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - $data['group_id'] = $object->getGroupId(); - $data['workspace_id'] = $object->getWorkspaceId(); - $data['database'] = $object->getDatabase(); - $data['airtable_share_id'] = $object->getAirtableShareId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class AirtableImportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data)) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } - if (\array_key_exists('database', $data)) { - $object->setDatabase($data['database']); - unset($data['database']); - } - if (\array_key_exists('airtable_share_id', $data)) { - $object->setAirtableShareId($data['airtable_share_id']); - unset($data['airtable_share_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('group_id', $data)) { + $object->setGroupId($data['group_id']); + unset($data['group_id']); + } + if (\array_key_exists('workspace_id', $data)) { + $object->setWorkspaceId($data['workspace_id']); + unset($data['workspace_id']); + } + if (\array_key_exists('database', $data)) { + $object->setDatabase($data['database']); + unset($data['database']); + } + if (\array_key_exists('airtable_share_id', $data)) { + $object->setAirtableShareId($data['airtable_share_id']); + unset($data['airtable_share_id']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - $data['group_id'] = $object->getGroupId(); - $data['workspace_id'] = $object->getWorkspaceId(); - $data['database'] = $object->getDatabase(); - $data['airtable_share_id'] = $object->getAirtableShareId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => false]; + $dataArray['group_id'] = $data->getGroupId(); + $dataArray['workspace_id'] = $data->getWorkspaceId(); + $dataArray['database'] = $data->getDatabase(); + $dataArray['airtable_share_id'] = $data->getAirtableShareId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuditLogActionTypesGetResponse400Normalizer.php b/generated/Normalizer/ApiAdminAuditLogActionTypesGetResponse400Normalizer.php index 408e373..69e43b7 100644 --- a/generated/Normalizer/ApiAdminAuditLogActionTypesGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminAuditLogActionTypesGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuditLogActionTypesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuditLogActionTypesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminAuditLogActionTypesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuditLogExportPostResponse400Normalizer.php b/generated/Normalizer/ApiAdminAuditLogExportPostResponse400Normalizer.php index 61dcce4..6f9a488 100644 --- a/generated/Normalizer/ApiAdminAuditLogExportPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminAuditLogExportPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuditLogExportPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuditLogExportPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminAuditLogExportPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuditLogExportPostResponse404Normalizer.php b/generated/Normalizer/ApiAdminAuditLogExportPostResponse404Normalizer.php index 3211cd9..e1b95d6 100644 --- a/generated/Normalizer/ApiAdminAuditLogExportPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiAdminAuditLogExportPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuditLogExportPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuditLogExportPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => false]; - } + return $object; } -} else { - class ApiAdminAuditLogExportPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuditLogGetResponse400Normalizer.php b/generated/Normalizer/ApiAdminAuditLogGetResponse400Normalizer.php index 64c80fa..844fd9e 100644 --- a/generated/Normalizer/ApiAdminAuditLogGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminAuditLogGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuditLogGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuditLogGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminAuditLogGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuditLogUsersGetResponse400Normalizer.php b/generated/Normalizer/ApiAdminAuditLogUsersGetResponse400Normalizer.php index 0dfec2d..c880587 100644 --- a/generated/Normalizer/ApiAdminAuditLogUsersGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminAuditLogUsersGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuditLogUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuditLogUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminAuditLogUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuditLogWorkspacesGetResponse400Normalizer.php b/generated/Normalizer/ApiAdminAuditLogWorkspacesGetResponse400Normalizer.php index 35993d1..85571fb 100644 --- a/generated/Normalizer/ApiAdminAuditLogWorkspacesGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminAuditLogWorkspacesGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuditLogWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuditLogWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminAuditLogWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer.php index da6dbe4..98ebe12 100644 --- a/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer.php b/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer.php index 3b462fe..ce57cda 100644 --- a/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer.php index b4079bf..72adf51 100644 --- a/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer.php index 7990938..caeea6a 100644 --- a/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiAdminAuthProviderPostResponse400Normalizer.php b/generated/Normalizer/ApiAdminAuthProviderPostResponse400Normalizer.php index 7bfa839..afc6b63 100644 --- a/generated/Normalizer/ApiAdminAuthProviderPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminAuthProviderPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminAuthProviderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminAuthProviderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminAuthProviderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminGroupsGetResponse400Normalizer.php b/generated/Normalizer/ApiAdminGroupsGetResponse400Normalizer.php index a413c8c..9160173 100644 --- a/generated/Normalizer/ApiAdminGroupsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminGroupsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminGroupsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminGroupsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminGroupsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminGroupsGroupIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiAdminGroupsGroupIdDeleteResponse400Normalizer.php index 837a17e..227a69b 100644 --- a/generated/Normalizer/ApiAdminGroupsGroupIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminGroupsGroupIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminGroupsGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminGroupsGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminGroupsGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminUsersGetResponse400Normalizer.php b/generated/Normalizer/ApiAdminUsersGetResponse400Normalizer.php index 8768496..96f9256 100644 --- a/generated/Normalizer/ApiAdminUsersGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminUsersGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminUsersImpersonatePostResponse200Normalizer.php b/generated/Normalizer/ApiAdminUsersImpersonatePostResponse200Normalizer.php index 184a50c..46353af 100644 --- a/generated/Normalizer/ApiAdminUsersImpersonatePostResponse200Normalizer.php +++ b/generated/Normalizer/ApiAdminUsersImpersonatePostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminUsersImpersonatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminUsersImpersonatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('user', $data)) { + $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class, 'json', $context)); + unset($data['user']); + } + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); + } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => false]; - } + return $object; } -} else { - class ApiAdminUsersImpersonatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('user') && null !== $data->getUser()) { + $dataArray['user'] = $this->normalizer->normalize($data->getUser(), 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class === get_class($data); + if ($data->isInitialized('token') && null !== $data->getToken()) { + $dataArray['token'] = $data->getToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('accessToken') && null !== $data->getAccessToken()) { + $dataArray['access_token'] = $data->getAccessToken(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiAdminUsersImpersonatePostResponse200UserNormalizer.php b/generated/Normalizer/ApiAdminUsersImpersonatePostResponse200UserNormalizer.php index 35ba0b4..ff5cfdc 100644 --- a/generated/Normalizer/ApiAdminUsersImpersonatePostResponse200UserNormalizer.php +++ b/generated/Normalizer/ApiAdminUsersImpersonatePostResponse200UserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminUsersImpersonatePostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminUsersImpersonatePostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => false]; - } + return $object; } -} else { - class ApiAdminUsersImpersonatePostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class === get_class($data); + if ($data->isInitialized('username') && null !== $data->getUsername()) { + $dataArray['username'] = $data->getUsername(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => false]; } } diff --git a/generated/Normalizer/ApiAdminUsersPostResponse400Normalizer.php b/generated/Normalizer/ApiAdminUsersPostResponse400Normalizer.php index f09406d..c7de610 100644 --- a/generated/Normalizer/ApiAdminUsersPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminUsersPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminUsersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminUsersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminUsersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminUsersUserIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiAdminUsersUserIdDeleteResponse400Normalizer.php index 484bc32..9a25f73 100644 --- a/generated/Normalizer/ApiAdminUsersUserIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminUsersUserIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminUsersUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminUsersUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminUsersUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminUsersUserIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiAdminUsersUserIdPatchResponse400Normalizer.php index fb7a236..4f01db3 100644 --- a/generated/Normalizer/ApiAdminUsersUserIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminUsersUserIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminUsersUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminUsersUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminUsersUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminWorkspacesGetResponse400Normalizer.php b/generated/Normalizer/ApiAdminWorkspacesGetResponse400Normalizer.php index 3c76c29..44bced7 100644 --- a/generated/Normalizer/ApiAdminWorkspacesGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminWorkspacesGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer.php index 0a1170e..dc321fe 100644 --- a/generated/Normalizer/ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer.php b/generated/Normalizer/ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer.php index cb5c6d0..8484d43 100644 --- a/generated/Normalizer/ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer.php b/generated/Normalizer/ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer.php index 0bf37e8..5ec3c26 100644 --- a/generated/Normalizer/ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer.php b/generated/Normalizer/ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer.php index d1d1b6f..2f1536f 100644 --- a/generated/Normalizer/ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer.php b/generated/Normalizer/ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer.php index 57777cd..da8b72e 100644 --- a/generated/Normalizer/ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer.php b/generated/Normalizer/ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer.php index 72cafdb..a541388 100644 --- a/generated/Normalizer/ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer.php b/generated/Normalizer/ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer.php index ab23ad8..29c0f09 100644 --- a/generated/Normalizer/ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer.php b/generated/Normalizer/ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer.php index 9e22723..d32aaf4 100644 --- a/generated/Normalizer/ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer.php b/generated/Normalizer/ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer.php index 89ef8db..d1af0cd 100644 --- a/generated/Normalizer/ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsApplicationIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsApplicationIdDeleteResponse400Normalizer.php index 921c28a..83909a1 100644 --- a/generated/Normalizer/ApiApplicationsApplicationIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsApplicationIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsApplicationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsApplicationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsApplicationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsApplicationIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsApplicationIdDeleteResponse404Normalizer.php index 4d6701f..40b3e80 100644 --- a/generated/Normalizer/ApiApplicationsApplicationIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsApplicationIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsApplicationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsApplicationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsApplicationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer.php index 456e386..9a42a47 100644 --- a/generated/Normalizer/ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer.php index f39d19b..78856d9 100644 --- a/generated/Normalizer/ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsApplicationIdGetResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsApplicationIdGetResponse400Normalizer.php index 2643e16..4343020 100644 --- a/generated/Normalizer/ApiApplicationsApplicationIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsApplicationIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsApplicationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsApplicationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsApplicationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsApplicationIdGetResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsApplicationIdGetResponse404Normalizer.php index 90c2401..73b1cc9 100644 --- a/generated/Normalizer/ApiApplicationsApplicationIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsApplicationIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsApplicationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsApplicationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsApplicationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsApplicationIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsApplicationIdPatchResponse400Normalizer.php index 73c6e5a..4673381 100644 --- a/generated/Normalizer/ApiApplicationsApplicationIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsApplicationIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsApplicationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsApplicationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsApplicationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsApplicationIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsApplicationIdPatchResponse404Normalizer.php index c3669ea..ac2797d 100644 --- a/generated/Normalizer/ApiApplicationsApplicationIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsApplicationIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsApplicationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsApplicationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsApplicationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsGetResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsGetResponse400Normalizer.php index 9f8bda6..f870971 100644 --- a/generated/Normalizer/ApiApplicationsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsGroupGroupIdGetResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsGroupGroupIdGetResponse400Normalizer.php index 730f266..3bd3c31 100644 --- a/generated/Normalizer/ApiApplicationsGroupGroupIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsGroupGroupIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsGroupGroupIdGetResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsGroupGroupIdGetResponse404Normalizer.php index 199581d..483ee08 100644 --- a/generated/Normalizer/ApiApplicationsGroupGroupIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsGroupGroupIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer.php index 648c704..76bf15e 100644 --- a/generated/Normalizer/ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer.php index 3336ccf..ea0dc67 100644 --- a/generated/Normalizer/ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsGroupGroupIdPostResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsGroupGroupIdPostResponse400Normalizer.php index 7eb516a..841cf98 100644 --- a/generated/Normalizer/ApiApplicationsGroupGroupIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsGroupGroupIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsGroupGroupIdPostResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsGroupGroupIdPostResponse404Normalizer.php index 5159929..4ffdb7e 100644 --- a/generated/Normalizer/ApiApplicationsGroupGroupIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsGroupGroupIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer.php index 4e9ba41..af01908 100644 --- a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer.php index 71f62be..76b008d 100644 --- a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer.php index baf4d5e..149e5bc 100644 --- a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer.php index 08df20f..1478599 100644 --- a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer.php b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer.php index e41dd47..17b0777 100644 --- a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer.php b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer.php index 2e39682..f4410e3 100644 --- a/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiAuditLogActionTypesGetResponse400Normalizer.php b/generated/Normalizer/ApiAuditLogActionTypesGetResponse400Normalizer.php index a26e3f5..8a97b7b 100644 --- a/generated/Normalizer/ApiAuditLogActionTypesGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAuditLogActionTypesGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAuditLogActionTypesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAuditLogActionTypesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAuditLogActionTypesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAuditLogExportPostResponse400Normalizer.php b/generated/Normalizer/ApiAuditLogExportPostResponse400Normalizer.php index 4b881f8..4742e6f 100644 --- a/generated/Normalizer/ApiAuditLogExportPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiAuditLogExportPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAuditLogExportPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAuditLogExportPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => false]; - } + return $object; } -} else { - class ApiAuditLogExportPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAuditLogExportPostResponse404Normalizer.php b/generated/Normalizer/ApiAuditLogExportPostResponse404Normalizer.php index 8b4c6b9..db08623 100644 --- a/generated/Normalizer/ApiAuditLogExportPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiAuditLogExportPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAuditLogExportPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAuditLogExportPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => false]; - } + return $object; } -} else { - class ApiAuditLogExportPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiAuditLogGetResponse400Normalizer.php b/generated/Normalizer/ApiAuditLogGetResponse400Normalizer.php index 975bd1b..7821246 100644 --- a/generated/Normalizer/ApiAuditLogGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAuditLogGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAuditLogGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAuditLogGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAuditLogGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAuditLogUsersGetResponse400Normalizer.php b/generated/Normalizer/ApiAuditLogUsersGetResponse400Normalizer.php index e8c5c24..93afa39 100644 --- a/generated/Normalizer/ApiAuditLogUsersGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAuditLogUsersGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAuditLogUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAuditLogUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAuditLogUsersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiAuditLogWorkspacesGetResponse400Normalizer.php b/generated/Normalizer/ApiAuditLogWorkspacesGetResponse400Normalizer.php index 5994492..5f42207 100644 --- a/generated/Normalizer/ApiAuditLogWorkspacesGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiAuditLogWorkspacesGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiAuditLogWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiAuditLogWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => false]; - } + return $object; } -} else { - class ApiAuditLogWorkspacesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdDomainsGetResponse400Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdDomainsGetResponse400Normalizer.php index 39a6684..723c688 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdDomainsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdDomainsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdDomainsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdDomainsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdDomainsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdDomainsGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdDomainsGetResponse404Normalizer.php index 111050f..7f27380 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdDomainsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdDomainsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdDomainsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdDomainsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdDomainsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer.php index c2f98fb..ed8f78f 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer.php index c3eab42..0e418a6 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdDomainsPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdDomainsPostResponse400Normalizer.php index f0bf950..f60b86b 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdDomainsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdDomainsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdDomainsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdDomainsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdDomainsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdDomainsPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdDomainsPostResponse404Normalizer.php index d2d3d30..2c762e2 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdDomainsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdDomainsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdDomainsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdDomainsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdDomainsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer.php index 2c2bfd0..75a599f 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer.php index d55442f..c22eb92 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdPagesPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdPagesPostResponse400Normalizer.php index 9ba81eb..575b5bd 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdPagesPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdPagesPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdPagesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdPagesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdPagesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdPagesPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdPagesPostResponse404Normalizer.php index beaf4d6..44c1a12 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdPagesPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdPagesPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdPagesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdPagesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdPagesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdThemePatchResponse400Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdThemePatchResponse400Normalizer.php index 6c9960e..6a27b7f 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdThemePatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdThemePatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdThemePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdThemePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdThemePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderBuilderIdThemePatchResponse404Normalizer.php b/generated/Normalizer/ApiBuilderBuilderIdThemePatchResponse404Normalizer.php index 7c1ed01..a4f7cad 100644 --- a/generated/Normalizer/ApiBuilderBuilderIdThemePatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderBuilderIdThemePatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderBuilderIdThemePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderBuilderIdThemePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderBuilderIdThemePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer.php index 5fee2e3..10ce3d3 100644 --- a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer.php index 194f979..69bf44f 100644 --- a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer.php index 4287132..d3752ab 100644 --- a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer.php b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer.php index 4b9c96e..d0522b9 100644 --- a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer.php index 432ab79..0d68a2a 100644 --- a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer.php index 619d24f..b6a1c56 100644 --- a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer.php index 67f285e..23ecbdf 100644 --- a/generated/Normalizer/ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsDomainIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiBuilderDomainsDomainIdDeleteResponse400Normalizer.php index 48788e8..df9c8ae 100644 --- a/generated/Normalizer/ApiBuilderDomainsDomainIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsDomainIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsDomainIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsDomainIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsDomainIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsDomainIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDomainsDomainIdDeleteResponse404Normalizer.php index a52a927..3bec083 100644 --- a/generated/Normalizer/ApiBuilderDomainsDomainIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsDomainIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsDomainIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsDomainIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsDomainIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsDomainIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiBuilderDomainsDomainIdPatchResponse400Normalizer.php index 9737cef..b5cbdca 100644 --- a/generated/Normalizer/ApiBuilderDomainsDomainIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsDomainIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsDomainIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsDomainIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsDomainIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsDomainIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDomainsDomainIdPatchResponse404Normalizer.php index c0bb85b..500cefd 100644 --- a/generated/Normalizer/ApiBuilderDomainsDomainIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsDomainIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsDomainIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsDomainIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsDomainIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer.php index a89867b..a9752dc 100644 --- a/generated/Normalizer/ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer.php index 28d3c53..e004d33 100644 --- a/generated/Normalizer/ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer.php index 2e9b0b6..6100f5c 100644 --- a/generated/Normalizer/ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer.php index 415249d..5b92a0f 100644 --- a/generated/Normalizer/ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer.php index 089e50f..eacf165 100644 --- a/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer.php index bb0a68e..9739c0f 100644 --- a/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer.php index 1cfca4b..fe68c92 100644 --- a/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderElementElementIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiBuilderElementElementIdDeleteResponse400Normalizer.php index cb9e4d7..9dfeaab 100644 --- a/generated/Normalizer/ApiBuilderElementElementIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderElementElementIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderElementElementIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderElementElementIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderElementElementIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderElementElementIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiBuilderElementElementIdDeleteResponse404Normalizer.php index 6c0fd77..6b20b09 100644 --- a/generated/Normalizer/ApiBuilderElementElementIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderElementElementIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderElementElementIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderElementElementIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderElementElementIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderElementElementIdDuplicatePostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderElementElementIdDuplicatePostResponse400Normalizer.php index 91cfabc..eceef3d 100644 --- a/generated/Normalizer/ApiBuilderElementElementIdDuplicatePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderElementElementIdDuplicatePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderElementElementIdDuplicatePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderElementElementIdDuplicatePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderElementElementIdDuplicatePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderElementElementIdDuplicatePostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderElementElementIdDuplicatePostResponse404Normalizer.php index 87e8e0c..bd09544 100644 --- a/generated/Normalizer/ApiBuilderElementElementIdDuplicatePostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderElementElementIdDuplicatePostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderElementElementIdDuplicatePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderElementElementIdDuplicatePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderElementElementIdDuplicatePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderElementElementIdMovePatchResponse400Normalizer.php b/generated/Normalizer/ApiBuilderElementElementIdMovePatchResponse400Normalizer.php index 900ccd8..76ffedd 100644 --- a/generated/Normalizer/ApiBuilderElementElementIdMovePatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderElementElementIdMovePatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderElementElementIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderElementElementIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderElementElementIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderElementElementIdMovePatchResponse404Normalizer.php b/generated/Normalizer/ApiBuilderElementElementIdMovePatchResponse404Normalizer.php index 03e82d7..0576ede 100644 --- a/generated/Normalizer/ApiBuilderElementElementIdMovePatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderElementElementIdMovePatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderElementElementIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderElementElementIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderElementElementIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderElementElementIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiBuilderElementElementIdPatchResponse400Normalizer.php index 5013c87..4c09157 100644 --- a/generated/Normalizer/ApiBuilderElementElementIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderElementElementIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderElementElementIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderElementElementIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderElementElementIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderElementElementIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiBuilderElementElementIdPatchResponse404Normalizer.php index ca9fa93..c73adcc 100644 --- a/generated/Normalizer/ApiBuilderElementElementIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderElementElementIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderElementElementIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderElementElementIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderElementElementIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer.php index 96cbe95..43118fd 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer.php index 548383b..81194ee 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer.php index 1e6f69b..e6dbfae 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer.php index d76ffae..37ebe00 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdElementsGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdElementsGetResponse404Normalizer.php index b6eb16b..d35de56 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdElementsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdElementsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdElementsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdElementsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdElementsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdElementsPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdElementsPostResponse400Normalizer.php index 0ffb0f6..914f85e 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdElementsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdElementsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdElementsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdElementsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdElementsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdElementsPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdElementsPostResponse404Normalizer.php index f7156e2..92f2417 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdElementsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdElementsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdElementsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdElementsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdElementsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer.php index 82bde4a..202682d 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer.php index c53ba86..b14e67e 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer.php index 59b76b5..843426b 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer.php index d5945de..13aaffe 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer.php index 84f6a31..d66ec73 100644 --- a/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagesPageIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiBuilderPagesPageIdDeleteResponse400Normalizer.php index 727d074..08a4e47 100644 --- a/generated/Normalizer/ApiBuilderPagesPageIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagesPageIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagesPageIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagesPageIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderPagesPageIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagesPageIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagesPageIdDeleteResponse404Normalizer.php index 7a85259..dad01a4 100644 --- a/generated/Normalizer/ApiBuilderPagesPageIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagesPageIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagesPageIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagesPageIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagesPageIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer.php index e26b230..cbc80fa 100644 --- a/generated/Normalizer/ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer.php index 6e1db5c..9d9a90c 100644 --- a/generated/Normalizer/ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagesPageIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiBuilderPagesPageIdPatchResponse400Normalizer.php index 4347899..c95014a 100644 --- a/generated/Normalizer/ApiBuilderPagesPageIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagesPageIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagesPageIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagesPageIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderPagesPageIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderPagesPageIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiBuilderPagesPageIdPatchResponse404Normalizer.php index 6df91e1..66a3ff9 100644 --- a/generated/Normalizer/ApiBuilderPagesPageIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderPagesPageIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderPagesPageIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderPagesPageIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderPagesPageIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer.php index 3e8e1af..d002a84 100644 --- a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer.php index 2143319..bbe0da5 100644 --- a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer.php b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer.php index c4e4fdf..430269a 100644 --- a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer.php index 0e45d92..205ab06 100644 --- a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer.php index 6d28faa..77f6660 100644 --- a/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseExportJobIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseExportJobIdGetResponse404Normalizer.php index 4d47e83..978cdee 100644 --- a/generated/Normalizer/ApiDatabaseExportJobIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseExportJobIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseExportJobIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseExportJobIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseExportJobIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseExportTableTableIdPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseExportTableTableIdPostResponse400Normalizer.php index 4d78fd6..99a2c99 100644 --- a/generated/Normalizer/ApiDatabaseExportTableTableIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseExportTableTableIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseExportTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseExportTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseExportTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseExportTableTableIdPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseExportTableTableIdPostResponse404Normalizer.php index 991f8e8..0773a9b 100644 --- a/generated/Normalizer/ApiDatabaseExportTableTableIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseExportTableTableIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseExportTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseExportTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseExportTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer.php index 5a0c573..103b314 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer.php index 54e4ef3..19f8507 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer.php index 83cfb26..fd6dda5 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer.php index e6630bb..97afe2d 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer.php index 5e4bf82..20acb6f 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer.php index 1be1a62..d148b69 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdGetResponse400Normalizer.php index d761213..1faf484 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdGetResponse404Normalizer.php index 7271ec2..d0a8c43 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdPatchResponse400Normalizer.php index 267ae88..19b2ee9 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdPatchResponse404Normalizer.php index 0c43c93..9ac996f 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer.php index 38f260a..7c80a5a 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer.php index 820a3a4..365db04 100644 --- a/generated/Normalizer/ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer.php index 1328a46..d38a533 100644 --- a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer.php index 80ed407..99756e0 100644 --- a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse400Normalizer.php index 2a32397..baa3692 100644 --- a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse401Normalizer.php index c550f24..4f73086 100644 --- a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsTableTableIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsTableTableIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsTableTableIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse404Normalizer.php index 19e3e13..45da26a 100644 --- a/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsTableTableIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse400Normalizer.php index 9beffca..2a01d8d 100644 --- a/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse401Normalizer.php index 14dbad4..a001a9f 100644 --- a/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsTableTableIdPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsTableTableIdPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsTableTableIdPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse404Normalizer.php index 776a24d..0adc385 100644 --- a/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFieldsTableTableIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFieldsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFieldsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFieldsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFormulaTableIdTypePostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseFormulaTableIdTypePostResponse400Normalizer.php index 9d69d0b..b670c3e 100644 --- a/generated/Normalizer/ApiDatabaseFormulaTableIdTypePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFormulaTableIdTypePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFormulaTableIdTypePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFormulaTableIdTypePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseFormulaTableIdTypePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseFormulaTableIdTypePostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseFormulaTableIdTypePostResponse404Normalizer.php index 59505a7..d4ccfd6 100644 --- a/generated/Normalizer/ApiDatabaseFormulaTableIdTypePostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseFormulaTableIdTypePostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseFormulaTableIdTypePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseFormulaTableIdTypePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseFormulaTableIdTypePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse200Normalizer.php b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse200Normalizer.php index fae443f..d8ef2bc 100644 --- a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse200Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsNamesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsNamesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('{table_id}*', $data)) { - $object->setTableId($this->denormalizer->denormalize($data['{table_id}*'], \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class, 'json', $context)); - unset($data['{table_id}*']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['{table_id}*'] = $this->normalizer->normalize($object->getTableId(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('{table_id}*', $data)) { + $object->setTableId($this->denormalizer->denormalize($data['{table_id}*'], \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class, 'json', $context)); + unset($data['{table_id}*']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsNamesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['{table_id}*'] = $this->normalizer->normalize($data->getTableId(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('{table_id}*', $data)) { - $object->setTableId($this->denormalizer->denormalize($data['{table_id}*'], \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class, 'json', $context)); - unset($data['{table_id}*']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['{table_id}*'] = $this->normalizer->normalize($object->getTableId(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse200TableIdNormalizer.php b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse200TableIdNormalizer.php index da146d5..29260ae 100644 --- a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse200TableIdNormalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse200TableIdNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsNamesGetResponse200TableIdNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsNamesGetResponse200TableIdNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('{row_id}*', $data)) { - $object->setRowId($data['{row_id}*']); - unset($data['{row_id}*']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['{row_id}*'] = $object->getRowId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('{row_id}*', $data)) { + $object->setRowId($data['{row_id}*']); + unset($data['{row_id}*']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsNamesGetResponse200TableIdNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('rowId') && null !== $data->getRowId()) { + $dataArray['{row_id}*'] = $data->getRowId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('{row_id}*', $data)) { - $object->setRowId($data['{row_id}*']); - unset($data['{row_id}*']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['{row_id}*'] = $object->getRowId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse400Normalizer.php index a4fd13b..7e881a4 100644 --- a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsNamesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsNamesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsNamesGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse401Normalizer.php index 3c6bc1c..682ef59 100644 --- a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsNamesGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsNamesGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsNamesGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse404Normalizer.php index fddda52..b6b45b9 100644 --- a/generated/Normalizer/ApiDatabaseRowsNamesGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsNamesGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsNamesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsNamesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsNamesGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer.php index 840f8e7..9fefc18 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer.php index afca6a5..149b240 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer.php index 116719e..40a1007 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer.php index c4029a1..cb9d106 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer.php index c5b5478..651f9fe 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer.php index a8f44c9..592f45a 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer.php index aa8ed4e..113d4b5 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer.php index a6a0c2e..92a739e 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse400Normalizer.php index b348bf9..6a90749 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse401Normalizer.php index 2eba1e9..a40ecd9 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse404Normalizer.php index c1bfcea..ba5ac28 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse400Normalizer.php index 2b5752b..077ad8b 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse401Normalizer.php index 2951ce7..525daf0 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse404Normalizer.php index 6e77956..a94fb6b 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer.php index 7742837..2df2ff1 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer.php index ca97c42..48e9d98 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer.php index e4cbc6a..55a0818 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer.php index ba606cf..1ab5c7a 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer.php index 6865764..c32bbd3 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer.php index 5a4d334..4805df0 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer.php index 2079604..9a21a0d 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer.php index ce2c700..1dcdc7c 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer.php index 8c420f8..6f9ccee 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer.php index f77a5b7..a1827e0 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer.php index 5923994..5ff6881 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer.php index 7e2b039..3e729de 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer.php index 0150d6a..aa938ee 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer.php index 1c741e2..623bbc5 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer.php index ae2099a..e9c358a 100644 --- a/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer.php index eb6bff4..a04964a 100644 --- a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer.php index 9d544ff..9a6a8b4 100644 --- a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer.php index c524737..8f2b7cd 100644 --- a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer.php index 9f1efe0..964f109 100644 --- a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer.php index 7d5c48c..85e884f 100644 --- a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer.php index 34e156d..76197d1 100644 --- a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer.php index 863e901..6d94f84 100644 --- a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer.php index eeb9430..9eb338f 100644 --- a/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdDeleteResponse400Normalizer.php index c5cba3b..f0c67b0 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdDeleteResponse404Normalizer.php index a1ba1a3..07c1dd2 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer.php index 4a036d3..51656ac 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer.php index 44550bb..aeea069 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdGetResponse400Normalizer.php index cfadb56..5952298 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdGetResponse404Normalizer.php index b57a81b..2108fa1 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer.php index 49295ce..f0e7c19 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer.php index a8de881..635ba39 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdPatchResponse400Normalizer.php index 0605d76..920628e 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTablesTableIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTablesTableIdPatchResponse404Normalizer.php index 71043e9..18edfdf 100644 --- a/generated/Normalizer/ApiDatabaseTablesTableIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTablesTableIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTablesTableIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTablesTableIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTablesTableIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTokensCheckGetResponse403Normalizer.php b/generated/Normalizer/ApiDatabaseTokensCheckGetResponse403Normalizer.php index b42cc01..bdbe647 100644 --- a/generated/Normalizer/ApiDatabaseTokensCheckGetResponse403Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTokensCheckGetResponse403Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTokensCheckGetResponse403Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTokensCheckGetResponse403Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => false]; - } + return $object; } -} else { - class ApiDatabaseTokensCheckGetResponse403Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTokensPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTokensPostResponse400Normalizer.php index 50e20bc..2ceb79b 100644 --- a/generated/Normalizer/ApiDatabaseTokensPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTokensPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTokensPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTokensPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTokensPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTokensTokenIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTokensTokenIdDeleteResponse400Normalizer.php index 6333cd7..d9ba40f 100644 --- a/generated/Normalizer/ApiDatabaseTokensTokenIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTokensTokenIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTokensTokenIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTokensTokenIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTokensTokenIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTokensTokenIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTokensTokenIdDeleteResponse404Normalizer.php index c689be4..6dc5a0f 100644 --- a/generated/Normalizer/ApiDatabaseTokensTokenIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTokensTokenIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTokensTokenIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTokensTokenIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTokensTokenIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTokensTokenIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTokensTokenIdGetResponse400Normalizer.php index 5715f1f..f00e572 100644 --- a/generated/Normalizer/ApiDatabaseTokensTokenIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTokensTokenIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTokensTokenIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTokensTokenIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTokensTokenIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTokensTokenIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTokensTokenIdGetResponse404Normalizer.php index 8bd63a9..ed5eb30 100644 --- a/generated/Normalizer/ApiDatabaseTokensTokenIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTokensTokenIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTokensTokenIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTokensTokenIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTokensTokenIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTokensTokenIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseTokensTokenIdPatchResponse400Normalizer.php index 08354fe..3c98dc3 100644 --- a/generated/Normalizer/ApiDatabaseTokensTokenIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTokensTokenIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTokensTokenIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTokensTokenIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseTokensTokenIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseTokensTokenIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseTokensTokenIdPatchResponse404Normalizer.php index d066b4d..6c60f4d 100644 --- a/generated/Normalizer/ApiDatabaseTokensTokenIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseTokensTokenIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseTokensTokenIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseTokensTokenIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseTokensTokenIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer.php index 45de8c8..8e0db3c 100644 --- a/generated/Normalizer/ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer.php index 774df44..77829cc 100644 --- a/generated/Normalizer/ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer.php index 44f369d..b470370 100644 --- a/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer.php index 52d7082..c8778a4 100644 --- a/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer.php index a70817d..a5f5569 100644 --- a/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer.php index 3914910..0ff924f 100644 --- a/generated/Normalizer/ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer.php index b32c985..798ca9e 100644 --- a/generated/Normalizer/ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer.php index 4ef9dbb..27fad51 100644 --- a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer.php index 4e4826f..e58f6c8 100644 --- a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer.php index a2b7f08..5f20465 100644 --- a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer.php index e68086f..ecbdb1c 100644 --- a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer.php index c5fe3b0..02b2f28 100644 --- a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer.php index 7572bb0..f59675c 100644 --- a/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer.php index b5fe473..6606068 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer.php index 4ca4d45..c38e681 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer.php index 54c0274..7073e13 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer.php index e935895..a0b4810 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer.php index dcdf7f8..2ec2b40 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer.php index e745c02..31aabc9 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer.php index 698d550..ef61190 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer.php index db18069..8c521b2 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer.php index c584b7f..af59eb6 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer.php index 0c283b8..f2dc4d3 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer.php index c6b797d..e5a83c0 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer.php index e3dbaad..3ae4946 100644 --- a/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer.php index f856d04..2d7cd40 100644 --- a/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer.php index 455413a..0e40033 100644 --- a/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer.php index 4a46b14..4eddd38 100644 --- a/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer.php index 13dedf3..8d28980 100644 --- a/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer.php index 79a5c00..de85add 100644 --- a/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer.php index 91eb676..36cd48d 100644 --- a/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer.php index 04c0da7..b08f736 100644 --- a/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer.php index c788b17..452e6fd 100644 --- a/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer.php index 8a7236f..4d32e6d 100644 --- a/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer.php index f71113f..4eb92dd 100644 --- a/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer.php index e9e7842..36a2e2d 100644 --- a/generated/Normalizer/ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer.php index c5d2881..c9c28ea 100644 --- a/generated/Normalizer/ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer.php index af1d6af..1162964 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_{id}', $data)) { - $object->setFieldId($data['field_{id}']); - unset($data['field_{id}']); - } - if (\array_key_exists('total', $data)) { - $object->setTotal($data['total']); - unset($data['total']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('fieldId') && null !== $object->getFieldId()) { - $data['field_{id}'] = $object->getFieldId(); - } - if ($object->isInitialized('total') && null !== $object->getTotal()) { - $data['total'] = $object->getTotal(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field_{id}', $data)) { + $object->setFieldId($data['field_{id}']); + unset($data['field_{id}']); + } + if (\array_key_exists('total', $data)) { + $object->setTotal($data['total']); + unset($data['total']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('fieldId') && null !== $data->getFieldId()) { + $dataArray['field_{id}'] = $data->getFieldId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class === get_class($data); + if ($data->isInitialized('total') && null !== $data->getTotal()) { + $dataArray['total'] = $data->getTotal(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_{id}', $data)) { - $object->setFieldId($data['field_{id}']); - unset($data['field_{id}']); - } - if (\array_key_exists('total', $data)) { - $object->setTotal($data['total']); - unset($data['total']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('fieldId') && null !== $object->getFieldId()) { - $data['field_{id}'] = $object->getFieldId(); - } - if ($object->isInitialized('total') && null !== $object->getTotal()) { - $data['total'] = $object->getTotal(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer.php index ac15d55..69ea9d5 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer.php index 34016d4..49a9186 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer.php index a59535e..70571fa 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer.php index 601bfc0..a7ef6ac 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer.php index 3a56138..5b4e1a7 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer.php index 78e00a0..538869d 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer.php index 9cb783c..12697f6 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,143 +20,70 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('total', $data)) { - $object->setTotal($data['total']); - unset($data['total']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['value'] = $object->getValue(); - if ($object->isInitialized('total') && null !== $object->getTotal()) { - $data['total'] = $object->getTotal(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('total', $data)) { + $object->setTotal($data['total']); + unset($data['total']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['value'] = $data->getValue(); + if ($data->isInitialized('total') && null !== $data->getTotal()) { + $dataArray['total'] = $data->getTotal(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('total', $data)) { - $object->setTotal($data['total']); - unset($data['total']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['value'] = $object->getValue(); - if ($object->isInitialized('total') && null !== $object->getTotal()) { - $data['total'] = $object->getTotal(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer.php index e8f7e5e..f1e5090 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer.php index 85b1eb4..c560afc 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer.php index 6dc714a..4ebebc4 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_{id}', $data)) { - $object->setFieldId($data['field_{id}']); - unset($data['field_{id}']); - } - if (\array_key_exists('total', $data)) { - $object->setTotal($data['total']); - unset($data['total']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('fieldId') && null !== $object->getFieldId()) { - $data['field_{id}'] = $object->getFieldId(); - } - if ($object->isInitialized('total') && null !== $object->getTotal()) { - $data['total'] = $object->getTotal(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field_{id}', $data)) { + $object->setFieldId($data['field_{id}']); + unset($data['field_{id}']); + } + if (\array_key_exists('total', $data)) { + $object->setTotal($data['total']); + unset($data['total']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('fieldId') && null !== $data->getFieldId()) { + $dataArray['field_{id}'] = $data->getFieldId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class === get_class($data); + if ($data->isInitialized('total') && null !== $data->getTotal()) { + $dataArray['total'] = $data->getTotal(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_{id}', $data)) { - $object->setFieldId($data['field_{id}']); - unset($data['field_{id}']); - } - if (\array_key_exists('total', $data)) { - $object->setTotal($data['total']); - unset($data['total']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('fieldId') && null !== $object->getFieldId()) { - $data['field_{id}'] = $object->getFieldId(); - } - if ($object->isInitialized('total') && null !== $object->getTotal()) { - $data['total'] = $object->getTotal(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer.php index 3bc7f1d..38041f7 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer.php index 0d4d908..4585ad2 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdGetResponse400Normalizer.php index b36350b..6378257 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdGetResponse404Normalizer.php index 6f3c4bc..4d9bd49 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdPostResponse400Normalizer.php index 7581f1f..ac28adc 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGridViewIdPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGridViewIdPostResponse404Normalizer.php index 6e1f997..79efdcb 100644 --- a/generated/Normalizer/ApiDatabaseViewsGridViewIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGridViewIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGridViewIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGridViewIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGridViewIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer.php index 16e207b..9207bd9 100644 --- a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer.php index 73236bb..d7d36ac 100644 --- a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer.php index 83fecfc..ab591ee 100644 --- a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer.php index 7207dd5..a1e3d83 100644 --- a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer.php index e79a1d8..b36676b 100644 --- a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer.php index a5be00e..552c0e6 100644 --- a/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer.php index 34bdfc4..f69b8ed 100644 --- a/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer.php index 490d1bf..f371ef3 100644 --- a/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer.php index 93ed6ea..b3531de 100644 --- a/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer.php index d7efec8..869d4bd 100644 --- a/generated/Normalizer/ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer.php index 52c9b99..2576849 100644 --- a/generated/Normalizer/ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer.php index c871a81..2d0cf08 100644 --- a/generated/Normalizer/ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer.php index 6f8536d..c8abd72 100644 --- a/generated/Normalizer/ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer.php index 2d7b8d3..8ef9a71 100644 --- a/generated/Normalizer/ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer.php index 5362080..667e39c 100644 --- a/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer.php index 33e1292..a08b378 100644 --- a/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer.php index ac60c48..f0b5dab 100644 --- a/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer.php index 2eab5de..960db7e 100644 --- a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer.php index 28ccc1a..d65c848 100644 --- a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer.php index 3b331a9..67aaa7a 100644 --- a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer.php index ca12995..e0cd706 100644 --- a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer.php index 6011ca5..0fcbe3a 100644 --- a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer.php index d44c7be..dfe0abd 100644 --- a/generated/Normalizer/ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsTableTableIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsTableTableIdGetResponse400Normalizer.php index 573daa7..62d2a94 100644 --- a/generated/Normalizer/ApiDatabaseViewsTableTableIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsTableTableIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsTableTableIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsTableTableIdGetResponse404Normalizer.php index 07a55ab..e8a180c 100644 --- a/generated/Normalizer/ApiDatabaseViewsTableTableIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsTableTableIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer.php index 5b2ea29..ff38421 100644 --- a/generated/Normalizer/ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer.php index 3c0480e..f9a37d4 100644 --- a/generated/Normalizer/ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsTableTableIdPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsTableTableIdPostResponse400Normalizer.php index d05b691..493269d 100644 --- a/generated/Normalizer/ApiDatabaseViewsTableTableIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsTableTableIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsTableTableIdPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsTableTableIdPostResponse404Normalizer.php index ee0657c..977c5f8 100644 --- a/generated/Normalizer/ApiDatabaseViewsTableTableIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsTableTableIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer.php index 26d2e94..2ab254b 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer.php index 5cbbfe7..90a3094 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer.php index 685a663..3d3e849 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer.php index cc0de75..dcb2e9e 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdDeleteResponse400Normalizer.php index 8314acf..b56b06a 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdDeleteResponse404Normalizer.php index 983d4e0..5d31ee4 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer.php index 022b35e..ce697c1 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer.php index ac1b4eb..f15ba48 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer.php index 604c8e2..01da074 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer.php index 0139977..91dd2e3 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer.php index c05c554..649a534 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer.php index c78c6b7..71fb62d 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer.php index 658bbbb..595fc95 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer.php index ba0bf7f..5fb0e99 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer.php index 26b0251..b8b4b7a 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer.php index 9ccc1db..e0871fd 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer.php index e313ecb..70495c1 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer.php index 97845dc..a35f083 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdGetResponse400Normalizer.php index eb1b236..647f4a7 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdGetResponse404Normalizer.php index 932e687..5b6f8db 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer.php index 43f23ca..36cecce 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer.php index 9c04ef1..c835081 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer.php index 2caf11b..8627d9d 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer.php index 6e9abfd..221fedb 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdPatchResponse400Normalizer.php index 10fd871..eec7079 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdPatchResponse404Normalizer.php index e258ec4..e271235 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer.php index c8183b2..6168d81 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer.php index 68837b9..e4399a2 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer.php index 32bcee6..1cad5bf 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer.php index f347ef2..a998bda 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer.php index 5763a88..d9aa046 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer.php index 28e3ba6..3d934ab 100644 --- a/generated/Normalizer/ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer.php index 249b0d0..aa20f57 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer.php index a7aa683..38cc6a5 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer.php index dc56efe..95ad0b4 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer.php index 198a593..6c904ac 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer.php index c26d640..201e947 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer.php index ae06a92..f8b4997 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer.php index 0302fc6..3dc61ff 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer.php index edd1f2f..0ac225c 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer.php index d0d0960..746e267 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer.php index 6e9d2f1..1c946c2 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer.php index 97a7e26..ec9a7bc 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer.php index 1b3b848..caede0b 100644 --- a/generated/Normalizer/ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiFilesSignedDataGetResponse403Normalizer.php b/generated/Normalizer/ApiFilesSignedDataGetResponse403Normalizer.php index 29222cb..e60cea7 100644 --- a/generated/Normalizer/ApiFilesSignedDataGetResponse403Normalizer.php +++ b/generated/Normalizer/ApiFilesSignedDataGetResponse403Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiFilesSignedDataGetResponse403Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiFilesSignedDataGetResponse403Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => false]; - } + return $object; } -} else { - class ApiFilesSignedDataGetResponse403Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsGroupIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiGroupsGroupIdDeleteResponse400Normalizer.php index a04a3a1..05c60fa 100644 --- a/generated/Normalizer/ApiGroupsGroupIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsGroupIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsGroupIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiGroupsGroupIdDeleteResponse404Normalizer.php index 8324c27..9712423 100644 --- a/generated/Normalizer/ApiGroupsGroupIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsGroupIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsGroupIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsGroupIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsGroupIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsGroupIdLeavePostResponse400Normalizer.php b/generated/Normalizer/ApiGroupsGroupIdLeavePostResponse400Normalizer.php index 5cd42c3..35b504f 100644 --- a/generated/Normalizer/ApiGroupsGroupIdLeavePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsGroupIdLeavePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsGroupIdLeavePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsGroupIdLeavePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsGroupIdLeavePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsGroupIdLeavePostResponse404Normalizer.php b/generated/Normalizer/ApiGroupsGroupIdLeavePostResponse404Normalizer.php index 33e4717..6a5d036 100644 --- a/generated/Normalizer/ApiGroupsGroupIdLeavePostResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsGroupIdLeavePostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsGroupIdLeavePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsGroupIdLeavePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsGroupIdLeavePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsGroupIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiGroupsGroupIdPatchResponse400Normalizer.php index 331528a..80c1d32 100644 --- a/generated/Normalizer/ApiGroupsGroupIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsGroupIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsGroupIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsGroupIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsGroupIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsGroupIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiGroupsGroupIdPatchResponse404Normalizer.php index 00654c4..373880f 100644 --- a/generated/Normalizer/ApiGroupsGroupIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsGroupIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsGroupIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsGroupIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsGroupIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsGroupIdPermissionsGetResponse404Normalizer.php b/generated/Normalizer/ApiGroupsGroupIdPermissionsGetResponse404Normalizer.php index f4560a1..5516f73 100644 --- a/generated/Normalizer/ApiGroupsGroupIdPermissionsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsGroupIdPermissionsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsGroupIdPermissionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsGroupIdPermissionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsGroupIdPermissionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer.php index 8129623..71501b8 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer.php index 8582369..eb39f34 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer.php index 5f72143..2bb2cb5 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer.php index adc0e5f..4f9fcdf 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer.php index 3a82416..b5de115 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer.php index dace1f3..5cd293b 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer.php index 6132354..ba1a9d0 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer.php index 2009b68..70491fb 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer.php index 06f388f..f4b049b 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer.php index 8b0d0f7..51ed4fa 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer.php index d4c674f..44f9195 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer.php index 4da5407..02c9d3b 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer.php index 51a1d8a..a91de90 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer.php index 9527e46..8ae4872 100644 --- a/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsTokenTokenGetResponse400Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsTokenTokenGetResponse400Normalizer.php index 36943b6..1070ae3 100644 --- a/generated/Normalizer/ApiGroupsInvitationsTokenTokenGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsTokenTokenGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsTokenTokenGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsTokenTokenGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsTokenTokenGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsInvitationsTokenTokenGetResponse404Normalizer.php b/generated/Normalizer/ApiGroupsInvitationsTokenTokenGetResponse404Normalizer.php index 64a4dfb..ae10cd9 100644 --- a/generated/Normalizer/ApiGroupsInvitationsTokenTokenGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsInvitationsTokenTokenGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsInvitationsTokenTokenGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsInvitationsTokenTokenGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsInvitationsTokenTokenGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsUsersGroupGroupIdGetResponse400Normalizer.php b/generated/Normalizer/ApiGroupsUsersGroupGroupIdGetResponse400Normalizer.php index 2a75c6b..2dcbed8 100644 --- a/generated/Normalizer/ApiGroupsUsersGroupGroupIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsUsersGroupGroupIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsUsersGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsUsersGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsUsersGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsUsersGroupGroupIdGetResponse404Normalizer.php b/generated/Normalizer/ApiGroupsUsersGroupGroupIdGetResponse404Normalizer.php index 62db1c2..1ba9cda 100644 --- a/generated/Normalizer/ApiGroupsUsersGroupGroupIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsUsersGroupGroupIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsUsersGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsUsersGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsUsersGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer.php index 116d018..11dbcb0 100644 --- a/generated/Normalizer/ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer.php index 60f278f..723248a 100644 --- a/generated/Normalizer/ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsUsersGroupUserIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiGroupsUsersGroupUserIdPatchResponse400Normalizer.php index 4db59c8..10359b7 100644 --- a/generated/Normalizer/ApiGroupsUsersGroupUserIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiGroupsUsersGroupUserIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsUsersGroupUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsUsersGroupUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiGroupsUsersGroupUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiGroupsUsersGroupUserIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiGroupsUsersGroupUserIdPatchResponse404Normalizer.php index 7ece87d..5bf93fd 100644 --- a/generated/Normalizer/ApiGroupsUsersGroupUserIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiGroupsUsersGroupUserIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiGroupsUsersGroupUserIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiGroupsUsersGroupUserIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiGroupsUsersGroupUserIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiHealthEmailPostResponse400Normalizer.php b/generated/Normalizer/ApiHealthEmailPostResponse400Normalizer.php index ad02351..2646695 100644 --- a/generated/Normalizer/ApiHealthEmailPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiHealthEmailPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiHealthEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiHealthEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => false]; - } + return $object; } -} else { - class ApiHealthEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiIntegrationIntegrationIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiIntegrationIntegrationIdDeleteResponse400Normalizer.php index 008d7d6..65e8553 100644 --- a/generated/Normalizer/ApiIntegrationIntegrationIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiIntegrationIntegrationIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiIntegrationIntegrationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiIntegrationIntegrationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiIntegrationIntegrationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiIntegrationIntegrationIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiIntegrationIntegrationIdDeleteResponse404Normalizer.php index aecf70a..506be2a 100644 --- a/generated/Normalizer/ApiIntegrationIntegrationIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiIntegrationIntegrationIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiIntegrationIntegrationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiIntegrationIntegrationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiIntegrationIntegrationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiIntegrationIntegrationIdMovePatchResponse400Normalizer.php b/generated/Normalizer/ApiIntegrationIntegrationIdMovePatchResponse400Normalizer.php index b5b77f1..7c2e16d 100644 --- a/generated/Normalizer/ApiIntegrationIntegrationIdMovePatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiIntegrationIntegrationIdMovePatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiIntegrationIntegrationIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiIntegrationIntegrationIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => false]; - } + return $object; } -} else { - class ApiIntegrationIntegrationIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiIntegrationIntegrationIdMovePatchResponse404Normalizer.php b/generated/Normalizer/ApiIntegrationIntegrationIdMovePatchResponse404Normalizer.php index 752b73c..3b9b73f 100644 --- a/generated/Normalizer/ApiIntegrationIntegrationIdMovePatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiIntegrationIntegrationIdMovePatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiIntegrationIntegrationIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiIntegrationIntegrationIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => false]; - } + return $object; } -} else { - class ApiIntegrationIntegrationIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiIntegrationIntegrationIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiIntegrationIntegrationIdPatchResponse400Normalizer.php index 1af83bc..59994a0 100644 --- a/generated/Normalizer/ApiIntegrationIntegrationIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiIntegrationIntegrationIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiIntegrationIntegrationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiIntegrationIntegrationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiIntegrationIntegrationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiIntegrationIntegrationIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiIntegrationIntegrationIdPatchResponse404Normalizer.php index 23fbe80..411c0b1 100644 --- a/generated/Normalizer/ApiIntegrationIntegrationIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiIntegrationIntegrationIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiIntegrationIntegrationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiIntegrationIntegrationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiIntegrationIntegrationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiJobsJobIdGetResponse404Normalizer.php b/generated/Normalizer/ApiJobsJobIdGetResponse404Normalizer.php index a625aa7..a9c0eac 100644 --- a/generated/Normalizer/ApiJobsJobIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiJobsJobIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiJobsJobIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiJobsJobIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiJobsJobIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiJobsPostResponse400Normalizer.php b/generated/Normalizer/ApiJobsPostResponse400Normalizer.php index 371e815..0ba97b8 100644 --- a/generated/Normalizer/ApiJobsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiJobsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiJobsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiJobsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiJobsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiJobsPostResponse404Normalizer.php b/generated/Normalizer/ApiJobsPostResponse404Normalizer.php index 4cbfeea..bd95f69 100644 --- a/generated/Normalizer/ApiJobsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiJobsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiJobsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiJobsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiJobsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdCheckGetResponse404Normalizer.php b/generated/Normalizer/ApiLicensesIdCheckGetResponse404Normalizer.php index 11b6ba7..afb8b6c 100644 --- a/generated/Normalizer/ApiLicensesIdCheckGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdCheckGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdCheckGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdCheckGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => false]; - } + return $object; } -} else { - class ApiLicensesIdCheckGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiLicensesIdDeleteResponse404Normalizer.php index 33e95c6..4f965b0 100644 --- a/generated/Normalizer/ApiLicensesIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiLicensesIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdFillSeatsPostResponse400Normalizer.php b/generated/Normalizer/ApiLicensesIdFillSeatsPostResponse400Normalizer.php index 3d479a3..159ffb5 100644 --- a/generated/Normalizer/ApiLicensesIdFillSeatsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdFillSeatsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdFillSeatsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdFillSeatsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiLicensesIdFillSeatsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdFillSeatsPostResponse404Normalizer.php b/generated/Normalizer/ApiLicensesIdFillSeatsPostResponse404Normalizer.php index de82cae..de1b68c 100644 --- a/generated/Normalizer/ApiLicensesIdFillSeatsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdFillSeatsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdFillSeatsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdFillSeatsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiLicensesIdFillSeatsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdGetResponse404Normalizer.php b/generated/Normalizer/ApiLicensesIdGetResponse404Normalizer.php index 7d6530c..2bc1e7f 100644 --- a/generated/Normalizer/ApiLicensesIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiLicensesIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdLookupUsersGetResponse404Normalizer.php b/generated/Normalizer/ApiLicensesIdLookupUsersGetResponse404Normalizer.php index 626e2d3..6b4ded6 100644 --- a/generated/Normalizer/ApiLicensesIdLookupUsersGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdLookupUsersGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdLookupUsersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdLookupUsersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => false]; - } + return $object; } -} else { - class ApiLicensesIdLookupUsersGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdRemoveAllUsersPostResponse400Normalizer.php b/generated/Normalizer/ApiLicensesIdRemoveAllUsersPostResponse400Normalizer.php index dad2726..4b06de9 100644 --- a/generated/Normalizer/ApiLicensesIdRemoveAllUsersPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdRemoveAllUsersPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdRemoveAllUsersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdRemoveAllUsersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => false]; - } + return $object; } -} else { - class ApiLicensesIdRemoveAllUsersPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdRemoveAllUsersPostResponse404Normalizer.php b/generated/Normalizer/ApiLicensesIdRemoveAllUsersPostResponse404Normalizer.php index 2d3af1c..46145b7 100644 --- a/generated/Normalizer/ApiLicensesIdRemoveAllUsersPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdRemoveAllUsersPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdRemoveAllUsersPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdRemoveAllUsersPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => false]; - } + return $object; } -} else { - class ApiLicensesIdRemoveAllUsersPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdUserIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiLicensesIdUserIdDeleteResponse400Normalizer.php index bc44b25..f1eba71 100644 --- a/generated/Normalizer/ApiLicensesIdUserIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdUserIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiLicensesIdUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdUserIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiLicensesIdUserIdDeleteResponse404Normalizer.php index d52e22f..e422587 100644 --- a/generated/Normalizer/ApiLicensesIdUserIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdUserIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiLicensesIdUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdUserIdPostResponse400Normalizer.php b/generated/Normalizer/ApiLicensesIdUserIdPostResponse400Normalizer.php index 0faa660..de60dc7 100644 --- a/generated/Normalizer/ApiLicensesIdUserIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdUserIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdUserIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdUserIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiLicensesIdUserIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesIdUserIdPostResponse404Normalizer.php b/generated/Normalizer/ApiLicensesIdUserIdPostResponse404Normalizer.php index ac4d6ba..24e26fc 100644 --- a/generated/Normalizer/ApiLicensesIdUserIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiLicensesIdUserIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesIdUserIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesIdUserIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiLicensesIdUserIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiLicensesPostResponse400Normalizer.php b/generated/Normalizer/ApiLicensesPostResponse400Normalizer.php index b96d779..edf0071 100644 --- a/generated/Normalizer/ApiLicensesPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiLicensesPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiLicensesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiLicensesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => false]; - } + return $object; } -} else { - class ApiLicensesPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiNotificationsWorkspaceIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiNotificationsWorkspaceIdDeleteResponse400Normalizer.php index f0e42e4..73fb001 100644 --- a/generated/Normalizer/ApiNotificationsWorkspaceIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiNotificationsWorkspaceIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiNotificationsWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiNotificationsWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiNotificationsWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiNotificationsWorkspaceIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiNotificationsWorkspaceIdDeleteResponse404Normalizer.php index 355e43a..ab330a7 100644 --- a/generated/Normalizer/ApiNotificationsWorkspaceIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiNotificationsWorkspaceIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiNotificationsWorkspaceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiNotificationsWorkspaceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiNotificationsWorkspaceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiNotificationsWorkspaceIdGetResponse400Normalizer.php b/generated/Normalizer/ApiNotificationsWorkspaceIdGetResponse400Normalizer.php index c2543f9..0984c6a 100644 --- a/generated/Normalizer/ApiNotificationsWorkspaceIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiNotificationsWorkspaceIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiNotificationsWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiNotificationsWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiNotificationsWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiNotificationsWorkspaceIdGetResponse404Normalizer.php b/generated/Normalizer/ApiNotificationsWorkspaceIdGetResponse404Normalizer.php index e9d5d1d..2a9b8ae 100644 --- a/generated/Normalizer/ApiNotificationsWorkspaceIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiNotificationsWorkspaceIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiNotificationsWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiNotificationsWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiNotificationsWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer.php b/generated/Normalizer/ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer.php index 565c2d9..6896895 100644 --- a/generated/Normalizer/ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => false]; - } + return $object; } -} else { - class ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer.php b/generated/Normalizer/ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer.php index 9a26bac..0291796 100644 --- a/generated/Normalizer/ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => false]; - } + return $object; } -} else { - class ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer.php index 276fa44..a8332e8 100644 --- a/generated/Normalizer/ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer.php index 340019a..f3038ad 100644 --- a/generated/Normalizer/ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRoleGroupIdBatchPostResponse400Normalizer.php b/generated/Normalizer/ApiRoleGroupIdBatchPostResponse400Normalizer.php index 73ed8e5..3ee96db 100644 --- a/generated/Normalizer/ApiRoleGroupIdBatchPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiRoleGroupIdBatchPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleGroupIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleGroupIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => false]; - } + return $object; } -} else { - class ApiRoleGroupIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRoleGroupIdBatchPostResponse404Normalizer.php b/generated/Normalizer/ApiRoleGroupIdBatchPostResponse404Normalizer.php index f8d4de7..a7c9b71 100644 --- a/generated/Normalizer/ApiRoleGroupIdBatchPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiRoleGroupIdBatchPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleGroupIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleGroupIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => false]; - } + return $object; } -} else { - class ApiRoleGroupIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRoleGroupIdGetResponse400Normalizer.php b/generated/Normalizer/ApiRoleGroupIdGetResponse400Normalizer.php index 03c1c12..be179f5 100644 --- a/generated/Normalizer/ApiRoleGroupIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiRoleGroupIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiRoleGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRoleGroupIdGetResponse404Normalizer.php b/generated/Normalizer/ApiRoleGroupIdGetResponse404Normalizer.php index 7153f89..4904cb2 100644 --- a/generated/Normalizer/ApiRoleGroupIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiRoleGroupIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiRoleGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRoleGroupIdPostResponse400Normalizer.php b/generated/Normalizer/ApiRoleGroupIdPostResponse400Normalizer.php index 8fa304b..bf2135e 100644 --- a/generated/Normalizer/ApiRoleGroupIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiRoleGroupIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiRoleGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRoleGroupIdPostResponse404Normalizer.php b/generated/Normalizer/ApiRoleGroupIdPostResponse404Normalizer.php index 38c1bf7..e64277a 100644 --- a/generated/Normalizer/ApiRoleGroupIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiRoleGroupIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiRoleGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRoleWorkspaceIdBatchPostResponse400Normalizer.php b/generated/Normalizer/ApiRoleWorkspaceIdBatchPostResponse400Normalizer.php index 0f63f02..a38ea9b 100644 --- a/generated/Normalizer/ApiRoleWorkspaceIdBatchPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiRoleWorkspaceIdBatchPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleWorkspaceIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleWorkspaceIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => false]; - } + return $object; } -} else { - class ApiRoleWorkspaceIdBatchPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRoleWorkspaceIdBatchPostResponse404Normalizer.php b/generated/Normalizer/ApiRoleWorkspaceIdBatchPostResponse404Normalizer.php index 8088d74..77b8788 100644 --- a/generated/Normalizer/ApiRoleWorkspaceIdBatchPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiRoleWorkspaceIdBatchPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleWorkspaceIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleWorkspaceIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => false]; - } + return $object; } -} else { - class ApiRoleWorkspaceIdBatchPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRoleWorkspaceIdGetResponse400Normalizer.php b/generated/Normalizer/ApiRoleWorkspaceIdGetResponse400Normalizer.php index e2a3996..97ac2c2 100644 --- a/generated/Normalizer/ApiRoleWorkspaceIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiRoleWorkspaceIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiRoleWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRoleWorkspaceIdGetResponse404Normalizer.php b/generated/Normalizer/ApiRoleWorkspaceIdGetResponse404Normalizer.php index 07cf8d0..8b12242 100644 --- a/generated/Normalizer/ApiRoleWorkspaceIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiRoleWorkspaceIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiRoleWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRoleWorkspaceIdPostResponse400Normalizer.php b/generated/Normalizer/ApiRoleWorkspaceIdPostResponse400Normalizer.php index 065f189..5e43b41 100644 --- a/generated/Normalizer/ApiRoleWorkspaceIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiRoleWorkspaceIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiRoleWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRoleWorkspaceIdPostResponse404Normalizer.php b/generated/Normalizer/ApiRoleWorkspaceIdPostResponse404Normalizer.php index 720a518..b08140e 100644 --- a/generated/Normalizer/ApiRoleWorkspaceIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiRoleWorkspaceIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRoleWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRoleWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiRoleWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer.php index 05e696b..c3e76de 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer.php index 8cff26a..27a13a0 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer.php index 5dfbfe0..85e41e3 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer.php index 71b7374..16cacde 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer.php index 7aa4c4a..761a47f 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer.php index 98821e0..761b7aa 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdRowIdGetResponse400Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdRowIdGetResponse400Normalizer.php index 9b39967..cbdcc64 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdRowIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdRowIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdRowIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdRowIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdRowIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdRowIdGetResponse404Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdRowIdGetResponse404Normalizer.php index 2f031c9..9a50143 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdRowIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdRowIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdRowIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdRowIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdRowIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer.php index 2e677e8..c81a012 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer.php index cf91cfe..85d7ed6 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdRowIdPostResponse400Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdRowIdPostResponse400Normalizer.php index d0ebc30..21b7d82 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdRowIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdRowIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdRowIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdRowIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdRowIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiRowCommentsTableIdRowIdPostResponse404Normalizer.php b/generated/Normalizer/ApiRowCommentsTableIdRowIdPostResponse404Normalizer.php index 9a6c757..64d2d56 100644 --- a/generated/Normalizer/ApiRowCommentsTableIdRowIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiRowCommentsTableIdRowIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiRowCommentsTableIdRowIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiRowCommentsTableIdRowIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiRowCommentsTableIdRowIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer.php b/generated/Normalizer/ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer.php index aacdad1..6cb9ecf 100644 --- a/generated/Normalizer/ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer.php b/generated/Normalizer/ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer.php index 512b5f5..76df2cf 100644 --- a/generated/Normalizer/ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer.php b/generated/Normalizer/ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer.php index 0407e34..f062227 100644 --- a/generated/Normalizer/ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer.php b/generated/Normalizer/ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer.php index 73c2923..440cb92 100644 --- a/generated/Normalizer/ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiSnapshotsSnapshotIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiSnapshotsSnapshotIdDeleteResponse400Normalizer.php index e1f6a6e..8dbf988 100644 --- a/generated/Normalizer/ApiSnapshotsSnapshotIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiSnapshotsSnapshotIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSnapshotsSnapshotIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSnapshotsSnapshotIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiSnapshotsSnapshotIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiSnapshotsSnapshotIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiSnapshotsSnapshotIdDeleteResponse404Normalizer.php index 742c8b6..04b9dd2 100644 --- a/generated/Normalizer/ApiSnapshotsSnapshotIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiSnapshotsSnapshotIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSnapshotsSnapshotIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSnapshotsSnapshotIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiSnapshotsSnapshotIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer.php b/generated/Normalizer/ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer.php index 59beb82..33d767d 100644 --- a/generated/Normalizer/ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => false]; - } + return $object; } -} else { - class ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer.php b/generated/Normalizer/ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer.php index e12c990..2ede3df 100644 --- a/generated/Normalizer/ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer.php +++ b/generated/Normalizer/ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => false]; - } + return $object; } -} else { - class ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiSsoSamlLoginUrlGetResponse400Normalizer.php b/generated/Normalizer/ApiSsoSamlLoginUrlGetResponse400Normalizer.php index b36c6c4..679ba78 100644 --- a/generated/Normalizer/ApiSsoSamlLoginUrlGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiSsoSamlLoginUrlGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiSsoSamlLoginUrlGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiSsoSamlLoginUrlGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => false]; - } + return $object; } -} else { - class ApiSsoSamlLoginUrlGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsGroupGroupIdGetResponse404Normalizer.php b/generated/Normalizer/ApiTeamsGroupGroupIdGetResponse404Normalizer.php index 30bf68d..3b846d0 100644 --- a/generated/Normalizer/ApiTeamsGroupGroupIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsGroupGroupIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsGroupGroupIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsGroupGroupIdPostResponse400Normalizer.php b/generated/Normalizer/ApiTeamsGroupGroupIdPostResponse400Normalizer.php index 7f9257e..fa914f5 100644 --- a/generated/Normalizer/ApiTeamsGroupGroupIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiTeamsGroupGroupIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiTeamsGroupGroupIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsGroupGroupIdPostResponse404Normalizer.php b/generated/Normalizer/ApiTeamsGroupGroupIdPostResponse404Normalizer.php index 025cceb..994034d 100644 --- a/generated/Normalizer/ApiTeamsGroupGroupIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsGroupGroupIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsGroupGroupIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdDeleteResponse400Normalizer.php index 8715a53..42b802e 100644 --- a/generated/Normalizer/ApiTeamsTeamIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdDeleteResponse404Normalizer.php index ef06621..3841af6 100644 --- a/generated/Normalizer/ApiTeamsTeamIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdGetResponse404Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdGetResponse404Normalizer.php index 10b37b3..c0004de 100644 --- a/generated/Normalizer/ApiTeamsTeamIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdPutResponse400Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdPutResponse400Normalizer.php index bf719d0..d2534b8 100644 --- a/generated/Normalizer/ApiTeamsTeamIdPutResponse400Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdPutResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdPutResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdPutResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdPutResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdPutResponse404Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdPutResponse404Normalizer.php index cc977a2..770e7e8 100644 --- a/generated/Normalizer/ApiTeamsTeamIdPutResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdPutResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdPutResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdPutResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdPutResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdSubjectsGetResponse400Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdSubjectsGetResponse400Normalizer.php index d4fd2f6..0f33fe7 100644 --- a/generated/Normalizer/ApiTeamsTeamIdSubjectsGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdSubjectsGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdSubjectsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdSubjectsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdSubjectsGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdSubjectsPostResponse400Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdSubjectsPostResponse400Normalizer.php index d74a55a..5f815c3 100644 --- a/generated/Normalizer/ApiTeamsTeamIdSubjectsPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdSubjectsPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdSubjectsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdSubjectsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdSubjectsPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdSubjectsPostResponse404Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdSubjectsPostResponse404Normalizer.php index 464fc6d..6c5fdb9 100644 --- a/generated/Normalizer/ApiTeamsTeamIdSubjectsPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdSubjectsPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdSubjectsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdSubjectsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdSubjectsPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer.php index 20a5dc5..de39c2f 100644 --- a/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer.php index 7b4c6d0..9780cce 100644 --- a/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer.php b/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer.php index ba50259..028acef 100644 --- a/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer.php b/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer.php index 02e66cc..e925d4c 100644 --- a/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer.php b/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer.php index feecc72..92182f0 100644 --- a/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer.php b/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer.php index d34820e..a9a9ee4 100644 --- a/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer.php index 3ec2d95..9fbb231 100644 --- a/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer.php index 17d2b13..93dde18 100644 --- a/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer.php b/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer.php index 79dad57..8dc9fd2 100644 --- a/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer.php b/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer.php index 819f05d..4af1826 100644 --- a/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer.php b/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer.php index 1415e25..5973f2c 100644 --- a/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => false]; - } + return $object; } -} else { - class ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer.php b/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer.php index 5192be1..ea2c8dd 100644 --- a/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => false]; - } + return $object; } -} else { - class ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer.php b/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer.php index a822612..e6fe6e7 100644 --- a/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer.php b/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer.php index 557668f..aa0fa5a 100644 --- a/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiTrashGroupGroupIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiTrashGroupGroupIdDeleteResponse400Normalizer.php index 4a9bd33..0e755d2 100644 --- a/generated/Normalizer/ApiTrashGroupGroupIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiTrashGroupGroupIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTrashGroupGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTrashGroupGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiTrashGroupGroupIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTrashGroupGroupIdGetResponse400Normalizer.php b/generated/Normalizer/ApiTrashGroupGroupIdGetResponse400Normalizer.php index c0311f1..0c4f660 100644 --- a/generated/Normalizer/ApiTrashGroupGroupIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiTrashGroupGroupIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTrashGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTrashGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiTrashGroupGroupIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTrashRestorePatchResponse400Normalizer.php b/generated/Normalizer/ApiTrashRestorePatchResponse400Normalizer.php index 7980d27..3ea6301 100644 --- a/generated/Normalizer/ApiTrashRestorePatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiTrashRestorePatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTrashRestorePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTrashRestorePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => false]; - } + return $object; } -} else { - class ApiTrashRestorePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer.php index 91045fa..01001db 100644 --- a/generated/Normalizer/ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer.php b/generated/Normalizer/ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer.php index 6875285..a0fada2 100644 --- a/generated/Normalizer/ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserAccountPatchResponse400Normalizer.php b/generated/Normalizer/ApiUserAccountPatchResponse400Normalizer.php index b59f77b..2a2ec1f 100644 --- a/generated/Normalizer/ApiUserAccountPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserAccountPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserAccountPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserAccountPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiUserAccountPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserChangePasswordPostResponse400Normalizer.php b/generated/Normalizer/ApiUserChangePasswordPostResponse400Normalizer.php index bf9ce55..3939261 100644 --- a/generated/Normalizer/ApiUserChangePasswordPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserChangePasswordPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserChangePasswordPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserChangePasswordPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => false]; - } + return $object; } -} else { - class ApiUserChangePasswordPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserFilesUploadFilePostResponse400Normalizer.php b/generated/Normalizer/ApiUserFilesUploadFilePostResponse400Normalizer.php index 22ae332..971f2ec 100644 --- a/generated/Normalizer/ApiUserFilesUploadFilePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserFilesUploadFilePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserFilesUploadFilePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserFilesUploadFilePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => false]; - } + return $object; } -} else { - class ApiUserFilesUploadFilePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserFilesUploadViaUrlPostResponse400Normalizer.php b/generated/Normalizer/ApiUserFilesUploadViaUrlPostResponse400Normalizer.php index 60f0cb9..0d39326 100644 --- a/generated/Normalizer/ApiUserFilesUploadViaUrlPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserFilesUploadViaUrlPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserFilesUploadViaUrlPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserFilesUploadViaUrlPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => false]; - } + return $object; } -} else { - class ApiUserFilesUploadViaUrlPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserPostResponse200Normalizer.php b/generated/Normalizer/ApiUserPostResponse200Normalizer.php index ceef73e..1fcd1fc 100644 --- a/generated/Normalizer/ApiUserPostResponse200Normalizer.php +++ b/generated/Normalizer/ApiUserPostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('user', $data)) { + $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class, 'json', $context)); + unset($data['user']); + } + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); + } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + if (\array_key_exists('refresh_token', $data)) { + $object->setRefreshToken($data['refresh_token']); + unset($data['refresh_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => false]; - } + return $object; } -} else { - class ApiUserPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('user') && null !== $data->getUser()) { + $dataArray['user'] = $this->normalizer->normalize($data->getUser(), 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class === get_class($data); + if ($data->isInitialized('token') && null !== $data->getToken()) { + $dataArray['token'] = $data->getToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('accessToken') && null !== $data->getAccessToken()) { + $dataArray['access_token'] = $data->getAccessToken(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('refreshToken') && null !== $data->getRefreshToken()) { + $dataArray['refresh_token'] = $data->getRefreshToken(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiUserPostResponse200UserNormalizer.php b/generated/Normalizer/ApiUserPostResponse200UserNormalizer.php index 57b3e66..edaa75e 100644 --- a/generated/Normalizer/ApiUserPostResponse200UserNormalizer.php +++ b/generated/Normalizer/ApiUserPostResponse200UserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => false]; - } + return $object; } -} else { - class ApiUserPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class === get_class($data); + if ($data->isInitialized('username') && null !== $data->getUsername()) { + $dataArray['username'] = $data->getUsername(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => false]; } } diff --git a/generated/Normalizer/ApiUserPostResponse400Normalizer.php b/generated/Normalizer/ApiUserPostResponse400Normalizer.php index 6be2887..a65a521 100644 --- a/generated/Normalizer/ApiUserPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => false]; - } + return $object; } -} else { - class ApiUserPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserPostResponse404Normalizer.php b/generated/Normalizer/ApiUserPostResponse404Normalizer.php index 4e7a451..0c49ae1 100644 --- a/generated/Normalizer/ApiUserPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiUserPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => false]; - } + return $object; } -} else { - class ApiUserPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiUserResetPasswordPostResponse400Normalizer.php b/generated/Normalizer/ApiUserResetPasswordPostResponse400Normalizer.php index 8d24feb..8fae7d6 100644 --- a/generated/Normalizer/ApiUserResetPasswordPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserResetPasswordPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserResetPasswordPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserResetPasswordPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => false]; - } + return $object; } -} else { - class ApiUserResetPasswordPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserScheduleAccountDeletionPostResponse400Normalizer.php b/generated/Normalizer/ApiUserScheduleAccountDeletionPostResponse400Normalizer.php index cefd847..4987c03 100644 --- a/generated/Normalizer/ApiUserScheduleAccountDeletionPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserScheduleAccountDeletionPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserScheduleAccountDeletionPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserScheduleAccountDeletionPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => false]; - } + return $object; } -} else { - class ApiUserScheduleAccountDeletionPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserSendResetPasswordEmailPostResponse400Normalizer.php b/generated/Normalizer/ApiUserSendResetPasswordEmailPostResponse400Normalizer.php index 4c3592c..f7285d2 100644 --- a/generated/Normalizer/ApiUserSendResetPasswordEmailPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserSendResetPasswordEmailPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSendResetPasswordEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSendResetPasswordEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => false]; - } + return $object; } -} else { - class ApiUserSendResetPasswordEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceAuthRefreshPostResponse200Normalizer.php b/generated/Normalizer/ApiUserSourceAuthRefreshPostResponse200Normalizer.php index 3bda757..1e0aaac 100644 --- a/generated/Normalizer/ApiUserSourceAuthRefreshPostResponse200Normalizer.php +++ b/generated/Normalizer/ApiUserSourceAuthRefreshPostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceAuthRefreshPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceAuthRefreshPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => false]; - } + return $object; } -} else { - class ApiUserSourceAuthRefreshPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('accessToken') && null !== $data->getAccessToken()) { + $dataArray['access_token'] = $data->getAccessToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceUserSourceIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiUserSourceUserSourceIdDeleteResponse400Normalizer.php index e849df9..ace1631 100644 --- a/generated/Normalizer/ApiUserSourceUserSourceIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserSourceUserSourceIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceUserSourceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceUserSourceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiUserSourceUserSourceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceUserSourceIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiUserSourceUserSourceIdDeleteResponse404Normalizer.php index 2ea9451..2a359b5 100644 --- a/generated/Normalizer/ApiUserSourceUserSourceIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiUserSourceUserSourceIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceUserSourceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceUserSourceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiUserSourceUserSourceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer.php b/generated/Normalizer/ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer.php index 34d2739..bcf814c 100644 --- a/generated/Normalizer/ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer.php +++ b/generated/Normalizer/ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + if (\array_key_exists('refresh_token', $data)) { + $object->setRefreshToken($data['refresh_token']); + unset($data['refresh_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => false]; - } + return $object; } -} else { - class ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('accessToken') && null !== $data->getAccessToken()) { + $dataArray['access_token'] = $data->getAccessToken(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class === get_class($data); + if ($data->isInitialized('refreshToken') && null !== $data->getRefreshToken()) { + $dataArray['refresh_token'] = $data->getRefreshToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceUserSourceIdMovePatchResponse400Normalizer.php b/generated/Normalizer/ApiUserSourceUserSourceIdMovePatchResponse400Normalizer.php index 0fb1ddb..c26ba0d 100644 --- a/generated/Normalizer/ApiUserSourceUserSourceIdMovePatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserSourceUserSourceIdMovePatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceUserSourceIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceUserSourceIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => false]; - } + return $object; } -} else { - class ApiUserSourceUserSourceIdMovePatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceUserSourceIdMovePatchResponse404Normalizer.php b/generated/Normalizer/ApiUserSourceUserSourceIdMovePatchResponse404Normalizer.php index 9ba2e6a..0f7a999 100644 --- a/generated/Normalizer/ApiUserSourceUserSourceIdMovePatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiUserSourceUserSourceIdMovePatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceUserSourceIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceUserSourceIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => false]; - } + return $object; } -} else { - class ApiUserSourceUserSourceIdMovePatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceUserSourceIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiUserSourceUserSourceIdPatchResponse400Normalizer.php index 2f3fc3b..f47a944 100644 --- a/generated/Normalizer/ApiUserSourceUserSourceIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserSourceUserSourceIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceUserSourceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceUserSourceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiUserSourceUserSourceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceUserSourceIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiUserSourceUserSourceIdPatchResponse404Normalizer.php index 389d87c..e41842a 100644 --- a/generated/Normalizer/ApiUserSourceUserSourceIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiUserSourceUserSourceIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceUserSourceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceUserSourceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiUserSourceUserSourceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer.php b/generated/Normalizer/ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer.php index 714f41e..39e4895 100644 --- a/generated/Normalizer/ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer.php +++ b/generated/Normalizer/ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + if (\array_key_exists('refresh_token', $data)) { + $object->setRefreshToken($data['refresh_token']); + unset($data['refresh_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => false]; - } + return $object; } -} else { - class ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('accessToken') && null !== $data->getAccessToken()) { + $dataArray['access_token'] = $data->getAccessToken(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class === get_class($data); + if ($data->isInitialized('refreshToken') && null !== $data->getRefreshToken()) { + $dataArray['refresh_token'] = $data->getRefreshToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenAuthPostResponse200Normalizer.php b/generated/Normalizer/ApiUserTokenAuthPostResponse200Normalizer.php index c5d9a95..055439b 100644 --- a/generated/Normalizer/ApiUserTokenAuthPostResponse200Normalizer.php +++ b/generated/Normalizer/ApiUserTokenAuthPostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('user', $data)) { + $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class, 'json', $context)); + unset($data['user']); + } + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); + } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + if (\array_key_exists('refresh_token', $data)) { + $object->setRefreshToken($data['refresh_token']); + unset($data['refresh_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => false]; - } + return $object; } -} else { - class ApiUserTokenAuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('user') && null !== $data->getUser()) { + $dataArray['user'] = $this->normalizer->normalize($data->getUser(), 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class === get_class($data); + if ($data->isInitialized('token') && null !== $data->getToken()) { + $dataArray['token'] = $data->getToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('accessToken') && null !== $data->getAccessToken()) { + $dataArray['access_token'] = $data->getAccessToken(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('refreshToken') && null !== $data->getRefreshToken()) { + $dataArray['refresh_token'] = $data->getRefreshToken(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenAuthPostResponse200UserNormalizer.php b/generated/Normalizer/ApiUserTokenAuthPostResponse200UserNormalizer.php index 0314e64..bcfc992 100644 --- a/generated/Normalizer/ApiUserTokenAuthPostResponse200UserNormalizer.php +++ b/generated/Normalizer/ApiUserTokenAuthPostResponse200UserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenAuthPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenAuthPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => false]; - } + return $object; } -} else { - class ApiUserTokenAuthPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class === get_class($data); + if ($data->isInitialized('username') && null !== $data->getUsername()) { + $dataArray['username'] = $data->getUsername(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenAuthPostResponse401Normalizer.php b/generated/Normalizer/ApiUserTokenAuthPostResponse401Normalizer.php index ee0d58e..38523c2 100644 --- a/generated/Normalizer/ApiUserTokenAuthPostResponse401Normalizer.php +++ b/generated/Normalizer/ApiUserTokenAuthPostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenAuthPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenAuthPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => false]; - } + return $object; } -} else { - class ApiUserTokenAuthPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenRefreshPostResponse200Normalizer.php b/generated/Normalizer/ApiUserTokenRefreshPostResponse200Normalizer.php index ba63315..ef3de53 100644 --- a/generated/Normalizer/ApiUserTokenRefreshPostResponse200Normalizer.php +++ b/generated/Normalizer/ApiUserTokenRefreshPostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenRefreshPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenRefreshPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('user', $data)) { + $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class, 'json', $context)); + unset($data['user']); + } + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); + } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => false]; - } + return $object; } -} else { - class ApiUserTokenRefreshPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('user') && null !== $data->getUser()) { + $dataArray['user'] = $this->normalizer->normalize($data->getUser(), 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class === get_class($data); + if ($data->isInitialized('token') && null !== $data->getToken()) { + $dataArray['token'] = $data->getToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('accessToken') && null !== $data->getAccessToken()) { + $dataArray['access_token'] = $data->getAccessToken(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenRefreshPostResponse200UserNormalizer.php b/generated/Normalizer/ApiUserTokenRefreshPostResponse200UserNormalizer.php index 979fb67..090e189 100644 --- a/generated/Normalizer/ApiUserTokenRefreshPostResponse200UserNormalizer.php +++ b/generated/Normalizer/ApiUserTokenRefreshPostResponse200UserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenRefreshPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenRefreshPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => false]; - } + return $object; } -} else { - class ApiUserTokenRefreshPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class === get_class($data); + if ($data->isInitialized('username') && null !== $data->getUsername()) { + $dataArray['username'] = $data->getUsername(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenRefreshPostResponse401Normalizer.php b/generated/Normalizer/ApiUserTokenRefreshPostResponse401Normalizer.php index 1659d61..ec26220 100644 --- a/generated/Normalizer/ApiUserTokenRefreshPostResponse401Normalizer.php +++ b/generated/Normalizer/ApiUserTokenRefreshPostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenRefreshPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenRefreshPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => false]; - } + return $object; } -} else { - class ApiUserTokenRefreshPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenVerifyPostResponse200Normalizer.php b/generated/Normalizer/ApiUserTokenVerifyPostResponse200Normalizer.php index 73a83ea..0ef34f8 100644 --- a/generated/Normalizer/ApiUserTokenVerifyPostResponse200Normalizer.php +++ b/generated/Normalizer/ApiUserTokenVerifyPostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenVerifyPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenVerifyPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('user', $data)) { + $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class, 'json', $context)); + unset($data['user']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => false]; - } + return $object; } -} else { - class ApiUserTokenVerifyPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('user') && null !== $data->getUser()) { + $dataArray['user'] = $this->normalizer->normalize($data->getUser(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenVerifyPostResponse200UserNormalizer.php b/generated/Normalizer/ApiUserTokenVerifyPostResponse200UserNormalizer.php index fc25c85..56e474f 100644 --- a/generated/Normalizer/ApiUserTokenVerifyPostResponse200UserNormalizer.php +++ b/generated/Normalizer/ApiUserTokenVerifyPostResponse200UserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenVerifyPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenVerifyPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => false]; - } + return $object; } -} else { - class ApiUserTokenVerifyPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class === get_class($data); + if ($data->isInitialized('username') && null !== $data->getUsername()) { + $dataArray['username'] = $data->getUsername(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => false]; } } diff --git a/generated/Normalizer/ApiUserTokenVerifyPostResponse401Normalizer.php b/generated/Normalizer/ApiUserTokenVerifyPostResponse401Normalizer.php index c3d28c9..3c876a1 100644 --- a/generated/Normalizer/ApiUserTokenVerifyPostResponse401Normalizer.php +++ b/generated/Normalizer/ApiUserTokenVerifyPostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserTokenVerifyPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserTokenVerifyPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => false]; - } + return $object; } -} else { - class ApiUserTokenVerifyPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiUserVerifyEmailPostResponse200Normalizer.php b/generated/Normalizer/ApiUserVerifyEmailPostResponse200Normalizer.php index 3bb788f..25f82e0 100644 --- a/generated/Normalizer/ApiUserVerifyEmailPostResponse200Normalizer.php +++ b/generated/Normalizer/ApiUserVerifyEmailPostResponse200Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserVerifyEmailPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserVerifyEmailPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('user', $data)) { + $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class, 'json', $context)); + unset($data['user']); + } + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); + } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + if (\array_key_exists('refresh_token', $data)) { + $object->setRefreshToken($data['refresh_token']); + unset($data['refresh_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => false]; - } + return $object; } -} else { - class ApiUserVerifyEmailPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('user') && null !== $data->getUser()) { + $dataArray['user'] = $this->normalizer->normalize($data->getUser(), 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class === get_class($data); + if ($data->isInitialized('token') && null !== $data->getToken()) { + $dataArray['token'] = $data->getToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('accessToken') && null !== $data->getAccessToken()) { + $dataArray['access_token'] = $data->getAccessToken(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - if ($object->isInitialized('accessToken') && null !== $object->getAccessToken()) { - $data['access_token'] = $object->getAccessToken(); - } - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('refreshToken') && null !== $data->getRefreshToken()) { + $dataArray['refresh_token'] = $data->getRefreshToken(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => false]; } } diff --git a/generated/Normalizer/ApiUserVerifyEmailPostResponse200UserNormalizer.php b/generated/Normalizer/ApiUserVerifyEmailPostResponse200UserNormalizer.php index 37ab526..5c0a660 100644 --- a/generated/Normalizer/ApiUserVerifyEmailPostResponse200UserNormalizer.php +++ b/generated/Normalizer/ApiUserVerifyEmailPostResponse200UserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserVerifyEmailPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserVerifyEmailPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => false]; - } + return $object; } -} else { - class ApiUserVerifyEmailPostResponse200UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class === get_class($data); + if ($data->isInitialized('username') && null !== $data->getUsername()) { + $dataArray['username'] = $data->getUsername(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => false]; } } diff --git a/generated/Normalizer/ApiUserVerifyEmailPostResponse400Normalizer.php b/generated/Normalizer/ApiUserVerifyEmailPostResponse400Normalizer.php index 89e92ef..d4e28ce 100644 --- a/generated/Normalizer/ApiUserVerifyEmailPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiUserVerifyEmailPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserVerifyEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserVerifyEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => false]; - } + return $object; } -} else { - class ApiUserVerifyEmailPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiUserVerifyEmailPostResponse401Normalizer.php b/generated/Normalizer/ApiUserVerifyEmailPostResponse401Normalizer.php index 54b7ead..bb76611 100644 --- a/generated/Normalizer/ApiUserVerifyEmailPostResponse401Normalizer.php +++ b/generated/Normalizer/ApiUserVerifyEmailPostResponse401Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiUserVerifyEmailPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiUserVerifyEmailPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => false]; - } + return $object; } -} else { - class ApiUserVerifyEmailPostResponse401Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer.php index 1cc732c..a7f0626 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer.php index f33258d..1427687 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer.php index 78b655b..425cf85 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer.php index ab64cfb..7a75f2b 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer.php index 4d17c52..64bfd11 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer.php index c27ac03..54b762f 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer.php index f0c96c1..b56bec4 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer.php index 39ba6a4..a5e5930 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer.php index c0b1dcf..47fffc7 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer.php index 4080bd0..b954015 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer.php index 6d234ad..b92b678 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer.php index 66b995d..430559c 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer.php index fd1726d..889802e 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer.php index a055da8..2175d33 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer.php index 75a765c..1716137 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer.php index 323761b..b179dc9 100644 --- a/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer.php index adba79d..5d6c0ba 100644 --- a/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer.php index cc5c7d8..4954b3e 100644 --- a/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer.php index 026a1ad..590c8eb 100644 --- a/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer.php index fcdf325..d6b5e1a 100644 --- a/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer.php index 627ec27..8343bb4 100644 --- a/generated/Normalizer/ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer.php index 9be147a..b314e93 100644 --- a/generated/Normalizer/ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer.php index e19bd2a..0ec5879 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer.php index b2b2813..c90330b 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer.php index 6d7c8b9..f6a0096 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer.php index 42c044e..aaa2259 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdPatchResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdPatchResponse400Normalizer.php index ac4949e..89540b9 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdPatchResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdPatchResponse404Normalizer.php index e2c46b1..859b91c 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer.php index b3e81ee..53b4087 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer.php index 4ffdf86..65630fd 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => false]; } } diff --git a/generated/Normalizer/ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer.php b/generated/Normalizer/ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer.php index 23f6a70..cced6e2 100644 --- a/generated/Normalizer/ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer.php +++ b/generated/Normalizer/ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('detail', $data)) { + $object->setDetail($data['detail']); + unset($data['detail']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => false]; - } + return $object; } -} else { - class ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class === get_class($data); + if ($data->isInitialized('detail') && null !== $data->getDetail()) { + $dataArray['detail'] = $data->getDetail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('detail', $data)) { - $object->setDetail($data['detail']); - unset($data['detail']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('detail') && null !== $object->getDetail()) { - $data['detail'] = $object->getDetail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => false]; } } diff --git a/generated/Normalizer/AuditLogActionTypeNormalizer.php b/generated/Normalizer/AuditLogActionTypeNormalizer.php index 6002d97..2aa6a68 100644 --- a/generated/Normalizer/AuditLogActionTypeNormalizer.php +++ b/generated/Normalizer/AuditLogActionTypeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuditLogActionTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuditLogActionTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogActionType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuditLogActionType(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => false]; + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); } - } -} else { - class AuditLogActionTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogActionType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => false]; } } diff --git a/generated/Normalizer/AuditLogExportJobCreateJobNormalizer.php b/generated/Normalizer/AuditLogExportJobCreateJobNormalizer.php index e2ff039..a3ab268 100644 --- a/generated/Normalizer/AuditLogExportJobCreateJobNormalizer.php +++ b/generated/Normalizer/AuditLogExportJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,263 +20,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuditLogExportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuditLogExportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_first_row_header', $data)) { - $object->setCsvFirstRowHeader($data['csv_first_row_header']); - unset($data['csv_first_row_header']); - } - if (\array_key_exists('filter_user_id', $data)) { - $object->setFilterUserId($data['filter_user_id']); - unset($data['filter_user_id']); - } - if (\array_key_exists('filter_workspace_id', $data)) { - $object->setFilterWorkspaceId($data['filter_workspace_id']); - unset($data['filter_workspace_id']); - } - if (\array_key_exists('filter_action_type', $data)) { - $object->setFilterActionType($data['filter_action_type']); - unset($data['filter_action_type']); - } - if (\array_key_exists('filter_from_timestamp', $data)) { - $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); - unset($data['filter_from_timestamp']); - } - if (\array_key_exists('filter_to_timestamp', $data)) { - $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); - unset($data['filter_to_timestamp']); - } - if (\array_key_exists('exclude_columns', $data)) { - $object->setExcludeColumns($data['exclude_columns']); - unset($data['exclude_columns']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob(); + if (\array_key_exists('csv_first_row_header', $data) && \is_int($data['csv_first_row_header'])) { + $data['csv_first_row_header'] = (bool) $data['csv_first_row_header']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvFirstRowHeader') && null !== $object->getCsvFirstRowHeader()) { - $data['csv_first_row_header'] = $object->getCsvFirstRowHeader(); - } - if ($object->isInitialized('filterUserId') && null !== $object->getFilterUserId()) { - $data['filter_user_id'] = $object->getFilterUserId(); - } - if ($object->isInitialized('filterWorkspaceId') && null !== $object->getFilterWorkspaceId()) { - $data['filter_workspace_id'] = $object->getFilterWorkspaceId(); - } - if ($object->isInitialized('filterActionType') && null !== $object->getFilterActionType()) { - $data['filter_action_type'] = $object->getFilterActionType(); - } - if ($object->isInitialized('filterFromTimestamp') && null !== $object->getFilterFromTimestamp()) { - $data['filter_from_timestamp'] = $object->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('filterToTimestamp') && null !== $object->getFilterToTimestamp()) { - $data['filter_to_timestamp'] = $object->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('excludeColumns') && null !== $object->getExcludeColumns()) { - $data['exclude_columns'] = $object->getExcludeColumns(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('export_charset', $data)) { + $object->setExportCharset($data['export_charset']); + unset($data['export_charset']); + } + if (\array_key_exists('csv_column_separator', $data)) { + $object->setCsvColumnSeparator($data['csv_column_separator']); + unset($data['csv_column_separator']); + } + if (\array_key_exists('csv_first_row_header', $data)) { + $object->setCsvFirstRowHeader($data['csv_first_row_header']); + unset($data['csv_first_row_header']); + } + if (\array_key_exists('filter_user_id', $data)) { + $object->setFilterUserId($data['filter_user_id']); + unset($data['filter_user_id']); + } + if (\array_key_exists('filter_workspace_id', $data)) { + $object->setFilterWorkspaceId($data['filter_workspace_id']); + unset($data['filter_workspace_id']); + } + if (\array_key_exists('filter_action_type', $data)) { + $object->setFilterActionType($data['filter_action_type']); + unset($data['filter_action_type']); + } + if (\array_key_exists('filter_from_timestamp', $data)) { + $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); + unset($data['filter_from_timestamp']); + } + if (\array_key_exists('filter_to_timestamp', $data)) { + $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); + unset($data['filter_to_timestamp']); + } + if (\array_key_exists('exclude_columns', $data)) { + $object->setExcludeColumns($data['exclude_columns']); + unset($data['exclude_columns']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => false]; - } + return $object; } -} else { - class AuditLogExportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('exportCharset') && null !== $data->getExportCharset()) { + $dataArray['export_charset'] = $data->getExportCharset(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class === get_class($data); + if ($data->isInitialized('csvColumnSeparator') && null !== $data->getCsvColumnSeparator()) { + $dataArray['csv_column_separator'] = $data->getCsvColumnSeparator(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_first_row_header', $data)) { - $object->setCsvFirstRowHeader($data['csv_first_row_header']); - unset($data['csv_first_row_header']); - } - if (\array_key_exists('filter_user_id', $data)) { - $object->setFilterUserId($data['filter_user_id']); - unset($data['filter_user_id']); - } - if (\array_key_exists('filter_workspace_id', $data)) { - $object->setFilterWorkspaceId($data['filter_workspace_id']); - unset($data['filter_workspace_id']); - } - if (\array_key_exists('filter_action_type', $data)) { - $object->setFilterActionType($data['filter_action_type']); - unset($data['filter_action_type']); - } - if (\array_key_exists('filter_from_timestamp', $data)) { - $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); - unset($data['filter_from_timestamp']); - } - if (\array_key_exists('filter_to_timestamp', $data)) { - $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); - unset($data['filter_to_timestamp']); - } - if (\array_key_exists('exclude_columns', $data)) { - $object->setExcludeColumns($data['exclude_columns']); - unset($data['exclude_columns']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('csvFirstRowHeader') && null !== $data->getCsvFirstRowHeader()) { + $dataArray['csv_first_row_header'] = $data->getCsvFirstRowHeader(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvFirstRowHeader') && null !== $object->getCsvFirstRowHeader()) { - $data['csv_first_row_header'] = $object->getCsvFirstRowHeader(); - } - if ($object->isInitialized('filterUserId') && null !== $object->getFilterUserId()) { - $data['filter_user_id'] = $object->getFilterUserId(); - } - if ($object->isInitialized('filterWorkspaceId') && null !== $object->getFilterWorkspaceId()) { - $data['filter_workspace_id'] = $object->getFilterWorkspaceId(); - } - if ($object->isInitialized('filterActionType') && null !== $object->getFilterActionType()) { - $data['filter_action_type'] = $object->getFilterActionType(); - } - if ($object->isInitialized('filterFromTimestamp') && null !== $object->getFilterFromTimestamp()) { - $data['filter_from_timestamp'] = $object->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('filterToTimestamp') && null !== $object->getFilterToTimestamp()) { - $data['filter_to_timestamp'] = $object->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('excludeColumns') && null !== $object->getExcludeColumns()) { - $data['exclude_columns'] = $object->getExcludeColumns(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('filterUserId') && null !== $data->getFilterUserId()) { + $dataArray['filter_user_id'] = $data->getFilterUserId(); + } + if ($data->isInitialized('filterWorkspaceId') && null !== $data->getFilterWorkspaceId()) { + $dataArray['filter_workspace_id'] = $data->getFilterWorkspaceId(); + } + if ($data->isInitialized('filterActionType') && null !== $data->getFilterActionType()) { + $dataArray['filter_action_type'] = $data->getFilterActionType(); + } + if ($data->isInitialized('filterFromTimestamp') && null !== $data->getFilterFromTimestamp()) { + $dataArray['filter_from_timestamp'] = $data->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('filterToTimestamp') && null !== $data->getFilterToTimestamp()) { + $dataArray['filter_to_timestamp'] = $data->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('excludeColumns') && null !== $data->getExcludeColumns()) { + $dataArray['exclude_columns'] = $data->getExcludeColumns(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/AuditLogExportJobJobNormalizer.php b/generated/Normalizer/AuditLogExportJobJobNormalizer.php index 7a1b7bd..f73a979 100644 --- a/generated/Normalizer/AuditLogExportJobJobNormalizer.php +++ b/generated/Normalizer/AuditLogExportJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,319 +20,161 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuditLogExportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuditLogExportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_first_row_header', $data)) { - $object->setCsvFirstRowHeader($data['csv_first_row_header']); - unset($data['csv_first_row_header']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('filter_user_id', $data)) { - $object->setFilterUserId($data['filter_user_id']); - unset($data['filter_user_id']); - } - if (\array_key_exists('filter_workspace_id', $data)) { - $object->setFilterWorkspaceId($data['filter_workspace_id']); - unset($data['filter_workspace_id']); - } - if (\array_key_exists('filter_action_type', $data)) { - $object->setFilterActionType($data['filter_action_type']); - unset($data['filter_action_type']); - } - if (\array_key_exists('filter_from_timestamp', $data)) { - $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); - unset($data['filter_from_timestamp']); - } - if (\array_key_exists('filter_to_timestamp', $data)) { - $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); - unset($data['filter_to_timestamp']); - } - if (\array_key_exists('exclude_columns', $data)) { - $object->setExcludeColumns($data['exclude_columns']); - unset($data['exclude_columns']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('exported_file_name', $data)) { - $object->setExportedFileName($data['exported_file_name']); - unset($data['exported_file_name']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob(); + if (\array_key_exists('csv_first_row_header', $data) && \is_int($data['csv_first_row_header'])) { + $data['csv_first_row_header'] = (bool) $data['csv_first_row_header']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvFirstRowHeader') && null !== $object->getCsvFirstRowHeader()) { - $data['csv_first_row_header'] = $object->getCsvFirstRowHeader(); - } - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('filterUserId') && null !== $object->getFilterUserId()) { - $data['filter_user_id'] = $object->getFilterUserId(); - } - if ($object->isInitialized('filterWorkspaceId') && null !== $object->getFilterWorkspaceId()) { - $data['filter_workspace_id'] = $object->getFilterWorkspaceId(); - } - if ($object->isInitialized('filterActionType') && null !== $object->getFilterActionType()) { - $data['filter_action_type'] = $object->getFilterActionType(); - } - if ($object->isInitialized('filterFromTimestamp') && null !== $object->getFilterFromTimestamp()) { - $data['filter_from_timestamp'] = $object->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('filterToTimestamp') && null !== $object->getFilterToTimestamp()) { - $data['filter_to_timestamp'] = $object->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('excludeColumns') && null !== $object->getExcludeColumns()) { - $data['exclude_columns'] = $object->getExcludeColumns(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); + } + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); + } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('csv_column_separator', $data)) { + $object->setCsvColumnSeparator($data['csv_column_separator']); + unset($data['csv_column_separator']); + } + if (\array_key_exists('csv_first_row_header', $data)) { + $object->setCsvFirstRowHeader($data['csv_first_row_header']); + unset($data['csv_first_row_header']); + } + if (\array_key_exists('export_charset', $data)) { + $object->setExportCharset($data['export_charset']); + unset($data['export_charset']); + } + if (\array_key_exists('filter_user_id', $data)) { + $object->setFilterUserId($data['filter_user_id']); + unset($data['filter_user_id']); + } + if (\array_key_exists('filter_workspace_id', $data)) { + $object->setFilterWorkspaceId($data['filter_workspace_id']); + unset($data['filter_workspace_id']); + } + if (\array_key_exists('filter_action_type', $data)) { + $object->setFilterActionType($data['filter_action_type']); + unset($data['filter_action_type']); + } + if (\array_key_exists('filter_from_timestamp', $data)) { + $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); + unset($data['filter_from_timestamp']); + } + if (\array_key_exists('filter_to_timestamp', $data)) { + $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); + unset($data['filter_to_timestamp']); + } + if (\array_key_exists('exclude_columns', $data)) { + $object->setExcludeColumns($data['exclude_columns']); + unset($data['exclude_columns']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('exported_file_name', $data)) { + $object->setExportedFileName($data['exported_file_name']); + unset($data['exported_file_name']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => false]; - } + return $object; } -} else { - class AuditLogExportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class === get_class($data); + if ($data->isInitialized('csvColumnSeparator') && null !== $data->getCsvColumnSeparator()) { + $dataArray['csv_column_separator'] = $data->getCsvColumnSeparator(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_first_row_header', $data)) { - $object->setCsvFirstRowHeader($data['csv_first_row_header']); - unset($data['csv_first_row_header']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('filter_user_id', $data)) { - $object->setFilterUserId($data['filter_user_id']); - unset($data['filter_user_id']); - } - if (\array_key_exists('filter_workspace_id', $data)) { - $object->setFilterWorkspaceId($data['filter_workspace_id']); - unset($data['filter_workspace_id']); - } - if (\array_key_exists('filter_action_type', $data)) { - $object->setFilterActionType($data['filter_action_type']); - unset($data['filter_action_type']); - } - if (\array_key_exists('filter_from_timestamp', $data)) { - $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); - unset($data['filter_from_timestamp']); - } - if (\array_key_exists('filter_to_timestamp', $data)) { - $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); - unset($data['filter_to_timestamp']); - } - if (\array_key_exists('exclude_columns', $data)) { - $object->setExcludeColumns($data['exclude_columns']); - unset($data['exclude_columns']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('exported_file_name', $data)) { - $object->setExportedFileName($data['exported_file_name']); - unset($data['exported_file_name']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('csvFirstRowHeader') && null !== $data->getCsvFirstRowHeader()) { + $dataArray['csv_first_row_header'] = $data->getCsvFirstRowHeader(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvFirstRowHeader') && null !== $object->getCsvFirstRowHeader()) { - $data['csv_first_row_header'] = $object->getCsvFirstRowHeader(); - } - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('filterUserId') && null !== $object->getFilterUserId()) { - $data['filter_user_id'] = $object->getFilterUserId(); - } - if ($object->isInitialized('filterWorkspaceId') && null !== $object->getFilterWorkspaceId()) { - $data['filter_workspace_id'] = $object->getFilterWorkspaceId(); - } - if ($object->isInitialized('filterActionType') && null !== $object->getFilterActionType()) { - $data['filter_action_type'] = $object->getFilterActionType(); - } - if ($object->isInitialized('filterFromTimestamp') && null !== $object->getFilterFromTimestamp()) { - $data['filter_from_timestamp'] = $object->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('filterToTimestamp') && null !== $object->getFilterToTimestamp()) { - $data['filter_to_timestamp'] = $object->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('excludeColumns') && null !== $object->getExcludeColumns()) { - $data['exclude_columns'] = $object->getExcludeColumns(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('exportCharset') && null !== $data->getExportCharset()) { + $dataArray['export_charset'] = $data->getExportCharset(); + } + if ($data->isInitialized('filterUserId') && null !== $data->getFilterUserId()) { + $dataArray['filter_user_id'] = $data->getFilterUserId(); + } + if ($data->isInitialized('filterWorkspaceId') && null !== $data->getFilterWorkspaceId()) { + $dataArray['filter_workspace_id'] = $data->getFilterWorkspaceId(); + } + if ($data->isInitialized('filterActionType') && null !== $data->getFilterActionType()) { + $dataArray['filter_action_type'] = $data->getFilterActionType(); + } + if ($data->isInitialized('filterFromTimestamp') && null !== $data->getFilterFromTimestamp()) { + $dataArray['filter_from_timestamp'] = $data->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('filterToTimestamp') && null !== $data->getFilterToTimestamp()) { + $dataArray['filter_to_timestamp'] = $data->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('excludeColumns') && null !== $data->getExcludeColumns()) { + $dataArray['exclude_columns'] = $data->getExcludeColumns(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => false]; } } diff --git a/generated/Normalizer/AuditLogNormalizer.php b/generated/Normalizer/AuditLogNormalizer.php index 8291088..fd29f89 100644 --- a/generated/Normalizer/AuditLogNormalizer.php +++ b/generated/Normalizer/AuditLogNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,197 +20,97 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuditLogNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuditLogNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuditLog::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLog::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLog::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLog::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLog(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('action_type', $data)) { - $object->setActionType($data['action_type']); - unset($data['action_type']); - } - if (\array_key_exists('user', $data)) { - $object->setUser($data['user']); - unset($data['user']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('timestamp', $data)) { - $object->setTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['timestamp'])); - unset($data['timestamp']); - } - if (\array_key_exists('ip_address', $data) && null !== $data['ip_address']) { - $object->setIpAddress($data['ip_address']); - unset($data['ip_address']); - } elseif (\array_key_exists('ip_address', $data) && null === $data['ip_address']) { - $object->setIpAddress(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuditLog(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['timestamp'] = $object->getTimestamp()?->format('Y-m-d\TH:i:sP'); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLog::class => false]; + if (\array_key_exists('action_type', $data)) { + $object->setActionType($data['action_type']); + unset($data['action_type']); } - } -} else { - class AuditLogNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLog::class === $type; + if (\array_key_exists('user', $data)) { + $object->setUser($data['user']); + unset($data['user']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLog::class === get_class($data); + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLog(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('action_type', $data)) { - $object->setActionType($data['action_type']); - unset($data['action_type']); - } - if (\array_key_exists('user', $data)) { - $object->setUser($data['user']); - unset($data['user']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('timestamp', $data)) { - $object->setTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['timestamp'])); - unset($data['timestamp']); - } - if (\array_key_exists('ip_address', $data) && null !== $data['ip_address']) { - $object->setIpAddress($data['ip_address']); - unset($data['ip_address']); - } elseif (\array_key_exists('ip_address', $data) && null === $data['ip_address']) { - $object->setIpAddress(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + if (\array_key_exists('timestamp', $data)) { + $object->setTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['timestamp'])); + unset($data['timestamp']); + } + if (\array_key_exists('ip_address', $data) && null !== $data['ip_address']) { + $object->setIpAddress($data['ip_address']); + unset($data['ip_address']); + } elseif (\array_key_exists('ip_address', $data) && null === $data['ip_address']) { + $object->setIpAddress(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['timestamp'] = $object->getTimestamp()?->format('Y-m-d\TH:i:sP'); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['timestamp'] = $data->getTimestamp()?->format('Y-m-d\TH:i:sP'); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLog::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuditLog::class => false]; } } diff --git a/generated/Normalizer/AuditLogUserNormalizer.php b/generated/Normalizer/AuditLogUserNormalizer.php index 294304b..4780fb5 100644 --- a/generated/Normalizer/AuditLogUserNormalizer.php +++ b/generated/Normalizer/AuditLogUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuditLogUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuditLogUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuditLogUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuditLogUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['value'] = $object->getValue(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogUser::class => false]; + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); } - } -} else { - class AuditLogUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogUser::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogUser::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['value'] = $data->getValue(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['value'] = $object->getValue(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogUser::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuditLogUser::class => false]; } } diff --git a/generated/Normalizer/AuditLogWorkspaceNormalizer.php b/generated/Normalizer/AuditLogWorkspaceNormalizer.php index 4ffb1ae..c891ff9 100644 --- a/generated/Normalizer/AuditLogWorkspaceNormalizer.php +++ b/generated/Normalizer/AuditLogWorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuditLogWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuditLogWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['value'] = $object->getValue(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => false]; + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); } - } -} else { - class AuditLogWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['value'] = $data->getValue(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['value'] = $object->getValue(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => false]; } } diff --git a/generated/Normalizer/AuthFormElementCreateElementNormalizer.php b/generated/Normalizer/AuthFormElementCreateElementNormalizer.php index 5a5be39..6ef620b 100644 --- a/generated/Normalizer/AuthFormElementCreateElementNormalizer.php +++ b/generated/Normalizer/AuthFormElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,555 +20,276 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuthFormElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuthFormElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { - $object->setUserSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('userSourceId') && null !== $object->getUserSourceId()) { - $data['user_source_id'] = $object->getUserSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { + $object->setUserSourceId($data['user_source_id']); + unset($data['user_source_id']); + } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { + $object->setUserSourceId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => false]; - } + return $object; } -} else { - class AuthFormElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { - $object->setUserSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('userSourceId') && null !== $object->getUserSourceId()) { - $data['user_source_id'] = $object->getUserSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('userSourceId') && null !== $data->getUserSourceId()) { + $dataArray['user_source_id'] = $data->getUserSourceId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/AuthFormElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/AuthFormElementCreateElementStyleBackgroundFileNormalizer.php index 841f1aa..03167be 100644 --- a/generated/Normalizer/AuthFormElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/AuthFormElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuthFormElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuthFormElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class AuthFormElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/AuthFormElementElementNormalizer.php b/generated/Normalizer/AuthFormElementElementNormalizer.php index 4bd8bcc..223799f 100644 --- a/generated/Normalizer/AuthFormElementElementNormalizer.php +++ b/generated/Normalizer/AuthFormElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,585 +20,291 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuthFormElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuthFormElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { - $object->setUserSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('userSourceId') && null !== $object->getUserSourceId()) { - $data['user_source_id'] = $object->getUserSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { + $object->setUserSourceId($data['user_source_id']); + unset($data['user_source_id']); + } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { + $object->setUserSourceId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => false]; - } + return $object; } -} else { - class AuthFormElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { - $object->setUserSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('userSourceId') && null !== $object->getUserSourceId()) { - $data['user_source_id'] = $object->getUserSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('userSourceId') && null !== $data->getUserSourceId()) { + $dataArray['user_source_id'] = $data->getUserSourceId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => false]; } } diff --git a/generated/Normalizer/AuthFormElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/AuthFormElementElementStyleBackgroundFileNormalizer.php index 3340d82..224e8da 100644 --- a/generated/Normalizer/AuthFormElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/AuthFormElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuthFormElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuthFormElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class AuthFormElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/AuthFormElementPublicElementNormalizer.php b/generated/Normalizer/AuthFormElementPublicElementNormalizer.php index 7a001a6..69f15ba 100644 --- a/generated/Normalizer/AuthFormElementPublicElementNormalizer.php +++ b/generated/Normalizer/AuthFormElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,577 +20,287 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuthFormElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuthFormElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { - $object->setUserSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('userSourceId') && null !== $object->getUserSourceId()) { - $data['user_source_id'] = $object->getUserSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { + $object->setUserSourceId($data['user_source_id']); + unset($data['user_source_id']); + } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { + $object->setUserSourceId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => false]; - } + return $object; } -} else { - class AuthFormElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { - $object->setUserSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('userSourceId') && null !== $object->getUserSourceId()) { - $data['user_source_id'] = $object->getUserSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('userSourceId') && null !== $data->getUserSourceId()) { + $dataArray['user_source_id'] = $data->getUserSourceId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/AuthFormElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/AuthFormElementPublicElementStyleBackgroundFileNormalizer.php index c6b9dc0..f3e1ecb 100644 --- a/generated/Normalizer/AuthFormElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/AuthFormElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuthFormElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuthFormElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class AuthFormElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/AuthFormElementUpdateElementNormalizer.php b/generated/Normalizer/AuthFormElementUpdateElementNormalizer.php index 7d843d5..e682e3c 100644 --- a/generated/Normalizer/AuthFormElementUpdateElementNormalizer.php +++ b/generated/Normalizer/AuthFormElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,523 +20,260 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuthFormElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuthFormElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { - $object->setUserSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('userSourceId') && null !== $object->getUserSourceId()) { - $data['user_source_id'] = $object->getUserSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { + $object->setUserSourceId($data['user_source_id']); + unset($data['user_source_id']); + } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { + $object->setUserSourceId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => false]; - } + return $object; } -} else { - class AuthFormElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('user_source_id', $data) && null !== $data['user_source_id']) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } elseif (\array_key_exists('user_source_id', $data) && null === $data['user_source_id']) { - $object->setUserSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('userSourceId') && null !== $object->getUserSourceId()) { - $data['user_source_id'] = $object->getUserSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('userSourceId') && null !== $data->getUserSourceId()) { + $dataArray['user_source_id'] = $data->getUserSourceId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/AuthFormElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/AuthFormElementUpdateElementStyleBackgroundFileNormalizer.php index dab2c1b..3e2d5d9 100644 --- a/generated/Normalizer/AuthFormElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/AuthFormElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AuthFormElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AuthFormElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class AuthFormElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/AutonumberFieldCreateFieldNormalizer.php b/generated/Normalizer/AutonumberFieldCreateFieldNormalizer.php index d5cf49f..dd0ec0c 100644 --- a/generated/Normalizer/AutonumberFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/AutonumberFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AutonumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AutonumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('viewId') && null !== $object->getViewId()) { - $data['view_id'] = $object->getViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => false]; - } + return $object; } -} else { - class AutonumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class === get_class($data); + if ($data->isInitialized('viewId') && null !== $data->getViewId()) { + $dataArray['view_id'] = $data->getViewId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('viewId') && null !== $object->getViewId()) { - $data['view_id'] = $object->getViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/AutonumberFieldFieldNormalizer.php b/generated/Normalizer/AutonumberFieldFieldNormalizer.php index c6368a3..a583c56 100644 --- a/generated/Normalizer/AutonumberFieldFieldNormalizer.php +++ b/generated/Normalizer/AutonumberFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AutonumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AutonumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => false]; - } + return $object; } -} else { - class AutonumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => false]; } } diff --git a/generated/Normalizer/AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer.php index 1349382..8828a5f 100644 --- a/generated/Normalizer/AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/AutonumberFieldUpdateFieldNormalizer.php b/generated/Normalizer/AutonumberFieldUpdateFieldNormalizer.php index a2df733..634e67a 100644 --- a/generated/Normalizer/AutonumberFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/AutonumberFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class AutonumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class AutonumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('viewId') && null !== $object->getViewId()) { - $data['view_id'] = $object->getViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => false]; - } + return $object; } -} else { - class AutonumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('viewId') && null !== $object->getViewId()) { - $data['view_id'] = $object->getViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('viewId') && null !== $data->getViewId()) { + $dataArray['view_id'] = $data->getViewId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/BaseExporterOptionsNormalizer.php b/generated/Normalizer/BaseExporterOptionsNormalizer.php index 0793714..e783655 100644 --- a/generated/Normalizer/BaseExporterOptionsNormalizer.php +++ b/generated/Normalizer/BaseExporterOptionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BaseExporterOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BaseExporterOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BaseExporterOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('exporter_type', $data)) { - $object->setExporterType($data['exporter_type']); - unset($data['exporter_type']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BaseExporterOptions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('viewId') && null !== $object->getViewId()) { - $data['view_id'] = $object->getViewId(); - } - $data['exporter_type'] = $object->getExporterType(); - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('exporter_type', $data)) { + $object->setExporterType($data['exporter_type']); + unset($data['exporter_type']); + } + if (\array_key_exists('export_charset', $data)) { + $object->setExportCharset($data['export_charset']); + unset($data['export_charset']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => false]; - } + return $object; } -} else { - class BaseExporterOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('viewId') && null !== $data->getViewId()) { + $dataArray['view_id'] = $data->getViewId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class === get_class($data); + $dataArray['exporter_type'] = $data->getExporterType(); + if ($data->isInitialized('exportCharset') && null !== $data->getExportCharset()) { + $dataArray['export_charset'] = $data->getExportCharset(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BaseExporterOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('exporter_type', $data)) { - $object->setExporterType($data['exporter_type']); - unset($data['exporter_type']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('viewId') && null !== $object->getViewId()) { - $data['view_id'] = $object->getViewId(); - } - $data['exporter_type'] = $object->getExporterType(); - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => false]; } } diff --git a/generated/Normalizer/BaserowImpersonateAuthTokenNormalizer.php b/generated/Normalizer/BaserowImpersonateAuthTokenNormalizer.php index c004c7e..58b338f 100644 --- a/generated/Normalizer/BaserowImpersonateAuthTokenNormalizer.php +++ b/generated/Normalizer/BaserowImpersonateAuthTokenNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BaserowImpersonateAuthTokenNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BaserowImpersonateAuthTokenNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($data['user']); - unset($data['user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['user'] = $object->getUser(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('user', $data)) { + $object->setUser($data['user']); + unset($data['user']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => false]; - } + return $object; } -} else { - class BaserowImpersonateAuthTokenNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('user', $data)) { - $object->setUser($data['user']); - unset($data['user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['user'] = $data->getUser(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['user'] = $object->getUser(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => false]; } } diff --git a/generated/Normalizer/BatchCreateRoleAssignmentNormalizer.php b/generated/Normalizer/BatchCreateRoleAssignmentNormalizer.php index a9acf0a..dbb3cbf 100644 --- a/generated/Normalizer/BatchCreateRoleAssignmentNormalizer.php +++ b/generated/Normalizer/BatchCreateRoleAssignmentNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BatchCreateRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BatchCreateRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class, 'json', $context); - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('items', $data)) { $values = []; - foreach ($object->getItems() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['items'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class, 'json', $context); } - $data['items'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setItems($values); + unset($data['items']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => false]; - } + return $object; } -} else { - class BatchCreateRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getItems() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['items'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class, 'json', $context); - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getItems() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['items'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => false]; } } diff --git a/generated/Normalizer/BatchCreateRowRequestNormalizer.php b/generated/Normalizer/BatchCreateRowRequestNormalizer.php index 6a88b40..7bd2a5e 100644 --- a/generated/Normalizer/BatchCreateRowRequestNormalizer.php +++ b/generated/Normalizer/BatchCreateRowRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BatchCreateRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BatchCreateRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class, 'json', $context); - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('items', $data)) { $values = []; - foreach ($object->getItems() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['items'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class, 'json', $context); } - $data['items'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setItems($values); + unset($data['items']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => false]; - } + return $object; } -} else { - class BatchCreateRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getItems() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['items'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class, 'json', $context); - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getItems() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['items'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => false]; } } diff --git a/generated/Normalizer/BatchDeleteRowsNormalizer.php b/generated/Normalizer/BatchDeleteRowsNormalizer.php index 04116c1..33ee0fe 100644 --- a/generated/Normalizer/BatchDeleteRowsNormalizer.php +++ b/generated/Normalizer/BatchDeleteRowsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BatchDeleteRowsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BatchDeleteRowsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BatchDeleteRows(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $value; - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BatchDeleteRows(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('items', $data)) { $values = []; - foreach ($object->getItems() as $value) { + foreach ($data['items'] as $value) { $values[] = $value; } - $data['items'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setItems($values); + unset($data['items']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => false]; - } + return $object; } -} else { - class BatchDeleteRowsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getItems() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['items'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\BatchDeleteRows(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $value; - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getItems() as $value) { - $values[] = $value; - } - $data['items'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => false]; } } diff --git a/generated/Normalizer/BatchUpdateRowNormalizer.php b/generated/Normalizer/BatchUpdateRowNormalizer.php index 2fb1d43..b4df948 100644 --- a/generated/Normalizer/BatchUpdateRowNormalizer.php +++ b/generated/Normalizer/BatchUpdateRowNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BatchUpdateRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BatchUpdateRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BatchUpdateRow(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BatchUpdateRow(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => false]; - } + return $object; } -} else { - class BatchUpdateRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BatchUpdateRow(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => false]; } } diff --git a/generated/Normalizer/BooleanFieldCreateFieldNormalizer.php b/generated/Normalizer/BooleanFieldCreateFieldNormalizer.php index fecccdf..e48aef7 100644 --- a/generated/Normalizer/BooleanFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/BooleanFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BooleanFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BooleanFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class BooleanFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/BooleanFieldFieldNormalizer.php b/generated/Normalizer/BooleanFieldFieldNormalizer.php index 76b12b1..75f5bc1 100644 --- a/generated/Normalizer/BooleanFieldFieldNormalizer.php +++ b/generated/Normalizer/BooleanFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BooleanFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BooleanFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => false]; - } + return $object; } -} else { - class BooleanFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => false]; } } diff --git a/generated/Normalizer/BooleanFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/BooleanFieldFieldSerializerWithRelatedFieldsNormalizer.php index ced0d16..2511403 100644 --- a/generated/Normalizer/BooleanFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/BooleanFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BooleanFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BooleanFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class BooleanFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/BooleanFieldUpdateFieldNormalizer.php b/generated/Normalizer/BooleanFieldUpdateFieldNormalizer.php index 472e7d7..7e44ee4 100644 --- a/generated/Normalizer/BooleanFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/BooleanFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BooleanFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BooleanFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => false]; - } + return $object; } -} else { - class BooleanFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/BuilderApplicationFaviconFileNormalizer.php b/generated/Normalizer/BuilderApplicationFaviconFileNormalizer.php index 43d70ee..972a78d 100644 --- a/generated/Normalizer/BuilderApplicationFaviconFileNormalizer.php +++ b/generated/Normalizer/BuilderApplicationFaviconFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderApplicationFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderApplicationFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => false]; - } + return $object; } -} else { - class BuilderApplicationFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => false]; } } diff --git a/generated/Normalizer/BuilderApplicationGroupNormalizer.php b/generated/Normalizer/BuilderApplicationGroupNormalizer.php index 9fa3549..8b79592 100644 --- a/generated/Normalizer/BuilderApplicationGroupNormalizer.php +++ b/generated/Normalizer/BuilderApplicationGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderApplicationGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderApplicationGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class BuilderApplicationGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => false]; } } diff --git a/generated/Normalizer/BuilderApplicationNormalizer.php b/generated/Normalizer/BuilderApplicationNormalizer.php index 8dc0377..54aeff7 100644 --- a/generated/Normalizer/BuilderApplicationNormalizer.php +++ b/generated/Normalizer/BuilderApplicationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,217 +20,107 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderApplication::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplication::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplication::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplication::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplication(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class, 'json', $context)); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class, 'json', $context)); - unset($data['workspace']); - } - if (\array_key_exists('pages', $data)) { - $values = []; - foreach ($data['pages'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Page::class, 'json', $context); - } - $object->setPages($values); - unset($data['pages']); - } - if (\array_key_exists('theme', $data)) { - $object->setTheme($this->denormalizer->denormalize($data['theme'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class, 'json', $context)); - unset($data['theme']); - } - if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { - $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class, 'json', $context)); - unset($data['favicon_file']); - } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { - $object->setFaviconFile(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplication(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['group'] = $this->normalizer->normalize($object->getGroup(), 'json', $context); - $data['workspace'] = $this->normalizer->normalize($object->getWorkspace(), 'json', $context); - if ($object->isInitialized('faviconFile') && null !== $object->getFaviconFile()) { - $data['favicon_file'] = $this->normalizer->normalize($object->getFaviconFile(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplication::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class BuilderApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplication::class === $type; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplication::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplication(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class, 'json', $context)); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class, 'json', $context)); - unset($data['workspace']); - } - if (\array_key_exists('pages', $data)) { - $values = []; - foreach ($data['pages'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Page::class, 'json', $context); - } - $object->setPages($values); - unset($data['pages']); - } - if (\array_key_exists('theme', $data)) { - $object->setTheme($this->denormalizer->denormalize($data['theme'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class, 'json', $context)); - unset($data['theme']); - } - if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { - $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class, 'json', $context)); - unset($data['favicon_file']); - } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { - $object->setFaviconFile(null); + if (\array_key_exists('group', $data)) { + $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class, 'json', $context)); + unset($data['group']); + } + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class, 'json', $context)); + unset($data['workspace']); + } + if (\array_key_exists('pages', $data)) { + $values = []; + foreach ($data['pages'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Page::class, 'json', $context); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $object->setPages($values); + unset($data['pages']); + } + if (\array_key_exists('theme', $data)) { + $object->setTheme($this->denormalizer->denormalize($data['theme'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class, 'json', $context)); + unset($data['theme']); + } + if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { + $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class, 'json', $context)); + unset($data['favicon_file']); + } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { + $object->setFaviconFile(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['group'] = $this->normalizer->normalize($object->getGroup(), 'json', $context); - $data['workspace'] = $this->normalizer->normalize($object->getWorkspace(), 'json', $context); - if ($object->isInitialized('faviconFile') && null !== $object->getFaviconFile()) { - $data['favicon_file'] = $this->normalizer->normalize($object->getFaviconFile(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $dataArray['group'] = $this->normalizer->normalize($data->getGroup(), 'json', $context); + $dataArray['workspace'] = $this->normalizer->normalize($data->getWorkspace(), 'json', $context); + if ($data->isInitialized('faviconFile') && null !== $data->getFaviconFile()) { + $dataArray['favicon_file'] = $this->normalizer->normalize($data->getFaviconFile(), 'json', $context); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplication::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderApplication::class => false]; } } diff --git a/generated/Normalizer/BuilderApplicationThemeNormalizer.php b/generated/Normalizer/BuilderApplicationThemeNormalizer.php index 4ee93af..057a4a1 100644 --- a/generated/Normalizer/BuilderApplicationThemeNormalizer.php +++ b/generated/Normalizer/BuilderApplicationThemeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,977 +20,487 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderApplicationThemeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderApplicationThemeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('primary_color', $data)) { - $object->setPrimaryColor($data['primary_color']); - unset($data['primary_color']); - } - if (\array_key_exists('secondary_color', $data)) { - $object->setSecondaryColor($data['secondary_color']); - unset($data['secondary_color']); - } - if (\array_key_exists('border_color', $data)) { - $object->setBorderColor($data['border_color']); - unset($data['border_color']); - } - if (\array_key_exists('main_success_color', $data)) { - $object->setMainSuccessColor($data['main_success_color']); - unset($data['main_success_color']); - } - if (\array_key_exists('main_warning_color', $data)) { - $object->setMainWarningColor($data['main_warning_color']); - unset($data['main_warning_color']); - } - if (\array_key_exists('main_error_color', $data)) { - $object->setMainErrorColor($data['main_error_color']); - unset($data['main_error_color']); - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { - $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); - unset($data['page_background_file']); - } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { - $object->setPageBackgroundFile(null); - } - if (\array_key_exists('page_background_color', $data)) { - $object->setPageBackgroundColor($data['page_background_color']); - unset($data['page_background_color']); - } - if (\array_key_exists('page_background_mode', $data)) { - $object->setPageBackgroundMode($data['page_background_mode']); - unset($data['page_background_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('primaryColor') && null !== $object->getPrimaryColor()) { - $data['primary_color'] = $object->getPrimaryColor(); - } - if ($object->isInitialized('secondaryColor') && null !== $object->getSecondaryColor()) { - $data['secondary_color'] = $object->getSecondaryColor(); - } - if ($object->isInitialized('borderColor') && null !== $object->getBorderColor()) { - $data['border_color'] = $object->getBorderColor(); - } - if ($object->isInitialized('mainSuccessColor') && null !== $object->getMainSuccessColor()) { - $data['main_success_color'] = $object->getMainSuccessColor(); - } - if ($object->isInitialized('mainWarningColor') && null !== $object->getMainWarningColor()) { - $data['main_warning_color'] = $object->getMainWarningColor(); - } - if ($object->isInitialized('mainErrorColor') && null !== $object->getMainErrorColor()) { - $data['main_error_color'] = $object->getMainErrorColor(); - } - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - if ($object->isInitialized('pageBackgroundFile') && null !== $object->getPageBackgroundFile()) { - $data['page_background_file'] = $this->normalizer->normalize($object->getPageBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('pageBackgroundColor') && null !== $object->getPageBackgroundColor()) { - $data['page_background_color'] = $object->getPageBackgroundColor(); - } - if ($object->isInitialized('pageBackgroundMode') && null !== $object->getPageBackgroundMode()) { - $data['page_background_mode'] = $object->getPageBackgroundMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('primary_color', $data)) { + $object->setPrimaryColor($data['primary_color']); + unset($data['primary_color']); + } + if (\array_key_exists('secondary_color', $data)) { + $object->setSecondaryColor($data['secondary_color']); + unset($data['secondary_color']); + } + if (\array_key_exists('border_color', $data)) { + $object->setBorderColor($data['border_color']); + unset($data['border_color']); + } + if (\array_key_exists('main_success_color', $data)) { + $object->setMainSuccessColor($data['main_success_color']); + unset($data['main_success_color']); + } + if (\array_key_exists('main_warning_color', $data)) { + $object->setMainWarningColor($data['main_warning_color']); + unset($data['main_warning_color']); + } + if (\array_key_exists('main_error_color', $data)) { + $object->setMainErrorColor($data['main_error_color']); + unset($data['main_error_color']); + } + if (\array_key_exists('body_font_family', $data)) { + $object->setBodyFontFamily($data['body_font_family']); + unset($data['body_font_family']); + } + if (\array_key_exists('body_font_size', $data)) { + $object->setBodyFontSize($data['body_font_size']); + unset($data['body_font_size']); + } + if (\array_key_exists('body_text_color', $data)) { + $object->setBodyTextColor($data['body_text_color']); + unset($data['body_text_color']); + } + if (\array_key_exists('body_text_alignment', $data)) { + $object->setBodyTextAlignment($data['body_text_alignment']); + unset($data['body_text_alignment']); + } + if (\array_key_exists('heading_1_font_family', $data)) { + $object->setHeading1FontFamily($data['heading_1_font_family']); + unset($data['heading_1_font_family']); + } + if (\array_key_exists('heading_1_font_size', $data)) { + $object->setHeading1FontSize($data['heading_1_font_size']); + unset($data['heading_1_font_size']); + } + if (\array_key_exists('heading_1_text_color', $data)) { + $object->setHeading1TextColor($data['heading_1_text_color']); + unset($data['heading_1_text_color']); + } + if (\array_key_exists('heading_1_text_alignment', $data)) { + $object->setHeading1TextAlignment($data['heading_1_text_alignment']); + unset($data['heading_1_text_alignment']); + } + if (\array_key_exists('heading_2_font_family', $data)) { + $object->setHeading2FontFamily($data['heading_2_font_family']); + unset($data['heading_2_font_family']); + } + if (\array_key_exists('heading_2_font_size', $data)) { + $object->setHeading2FontSize($data['heading_2_font_size']); + unset($data['heading_2_font_size']); + } + if (\array_key_exists('heading_2_text_color', $data)) { + $object->setHeading2TextColor($data['heading_2_text_color']); + unset($data['heading_2_text_color']); + } + if (\array_key_exists('heading_2_text_alignment', $data)) { + $object->setHeading2TextAlignment($data['heading_2_text_alignment']); + unset($data['heading_2_text_alignment']); + } + if (\array_key_exists('heading_3_font_family', $data)) { + $object->setHeading3FontFamily($data['heading_3_font_family']); + unset($data['heading_3_font_family']); + } + if (\array_key_exists('heading_3_font_size', $data)) { + $object->setHeading3FontSize($data['heading_3_font_size']); + unset($data['heading_3_font_size']); + } + if (\array_key_exists('heading_3_text_color', $data)) { + $object->setHeading3TextColor($data['heading_3_text_color']); + unset($data['heading_3_text_color']); + } + if (\array_key_exists('heading_3_text_alignment', $data)) { + $object->setHeading3TextAlignment($data['heading_3_text_alignment']); + unset($data['heading_3_text_alignment']); + } + if (\array_key_exists('heading_4_font_family', $data)) { + $object->setHeading4FontFamily($data['heading_4_font_family']); + unset($data['heading_4_font_family']); + } + if (\array_key_exists('heading_4_font_size', $data)) { + $object->setHeading4FontSize($data['heading_4_font_size']); + unset($data['heading_4_font_size']); + } + if (\array_key_exists('heading_4_text_color', $data)) { + $object->setHeading4TextColor($data['heading_4_text_color']); + unset($data['heading_4_text_color']); + } + if (\array_key_exists('heading_4_text_alignment', $data)) { + $object->setHeading4TextAlignment($data['heading_4_text_alignment']); + unset($data['heading_4_text_alignment']); + } + if (\array_key_exists('heading_5_font_family', $data)) { + $object->setHeading5FontFamily($data['heading_5_font_family']); + unset($data['heading_5_font_family']); + } + if (\array_key_exists('heading_5_font_size', $data)) { + $object->setHeading5FontSize($data['heading_5_font_size']); + unset($data['heading_5_font_size']); + } + if (\array_key_exists('heading_5_text_color', $data)) { + $object->setHeading5TextColor($data['heading_5_text_color']); + unset($data['heading_5_text_color']); + } + if (\array_key_exists('heading_5_text_alignment', $data)) { + $object->setHeading5TextAlignment($data['heading_5_text_alignment']); + unset($data['heading_5_text_alignment']); + } + if (\array_key_exists('heading_6_font_family', $data)) { + $object->setHeading6FontFamily($data['heading_6_font_family']); + unset($data['heading_6_font_family']); + } + if (\array_key_exists('heading_6_font_size', $data)) { + $object->setHeading6FontSize($data['heading_6_font_size']); + unset($data['heading_6_font_size']); + } + if (\array_key_exists('heading_6_text_color', $data)) { + $object->setHeading6TextColor($data['heading_6_text_color']); + unset($data['heading_6_text_color']); + } + if (\array_key_exists('heading_6_text_alignment', $data)) { + $object->setHeading6TextAlignment($data['heading_6_text_alignment']); + unset($data['heading_6_text_alignment']); + } + if (\array_key_exists('button_font_family', $data)) { + $object->setButtonFontFamily($data['button_font_family']); + unset($data['button_font_family']); + } + if (\array_key_exists('button_font_size', $data)) { + $object->setButtonFontSize($data['button_font_size']); + unset($data['button_font_size']); + } + if (\array_key_exists('button_alignment', $data)) { + $object->setButtonAlignment($data['button_alignment']); + unset($data['button_alignment']); + } + if (\array_key_exists('button_text_alignment', $data)) { + $object->setButtonTextAlignment($data['button_text_alignment']); + unset($data['button_text_alignment']); + } + if (\array_key_exists('button_width', $data)) { + $object->setButtonWidth($data['button_width']); + unset($data['button_width']); + } + if (\array_key_exists('button_background_color', $data)) { + $object->setButtonBackgroundColor($data['button_background_color']); + unset($data['button_background_color']); + } + if (\array_key_exists('button_text_color', $data)) { + $object->setButtonTextColor($data['button_text_color']); + unset($data['button_text_color']); + } + if (\array_key_exists('button_border_color', $data)) { + $object->setButtonBorderColor($data['button_border_color']); + unset($data['button_border_color']); + } + if (\array_key_exists('button_border_size', $data)) { + $object->setButtonBorderSize($data['button_border_size']); + unset($data['button_border_size']); + } + if (\array_key_exists('button_border_radius', $data)) { + $object->setButtonBorderRadius($data['button_border_radius']); + unset($data['button_border_radius']); + } + if (\array_key_exists('button_vertical_padding', $data)) { + $object->setButtonVerticalPadding($data['button_vertical_padding']); + unset($data['button_vertical_padding']); + } + if (\array_key_exists('button_horizontal_padding', $data)) { + $object->setButtonHorizontalPadding($data['button_horizontal_padding']); + unset($data['button_horizontal_padding']); + } + if (\array_key_exists('button_hover_background_color', $data)) { + $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); + unset($data['button_hover_background_color']); + } + if (\array_key_exists('button_hover_text_color', $data)) { + $object->setButtonHoverTextColor($data['button_hover_text_color']); + unset($data['button_hover_text_color']); + } + if (\array_key_exists('button_hover_border_color', $data)) { + $object->setButtonHoverBorderColor($data['button_hover_border_color']); + unset($data['button_hover_border_color']); + } + if (\array_key_exists('link_font_family', $data)) { + $object->setLinkFontFamily($data['link_font_family']); + unset($data['link_font_family']); + } + if (\array_key_exists('link_font_size', $data)) { + $object->setLinkFontSize($data['link_font_size']); + unset($data['link_font_size']); + } + if (\array_key_exists('link_text_alignment', $data)) { + $object->setLinkTextAlignment($data['link_text_alignment']); + unset($data['link_text_alignment']); + } + if (\array_key_exists('link_text_color', $data)) { + $object->setLinkTextColor($data['link_text_color']); + unset($data['link_text_color']); + } + if (\array_key_exists('link_hover_text_color', $data)) { + $object->setLinkHoverTextColor($data['link_hover_text_color']); + unset($data['link_hover_text_color']); + } + if (\array_key_exists('image_max_height', $data)) { + $object->setImageMaxHeight($data['image_max_height']); + unset($data['image_max_height']); + } + if (\array_key_exists('image_alignment', $data)) { + $object->setImageAlignment($data['image_alignment']); + unset($data['image_alignment']); + } + if (\array_key_exists('image_max_width', $data)) { + $object->setImageMaxWidth($data['image_max_width']); + unset($data['image_max_width']); + } + if (\array_key_exists('image_constraint', $data)) { + $object->setImageConstraint($data['image_constraint']); + unset($data['image_constraint']); + } + if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { + $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); + unset($data['page_background_file']); + } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { + $object->setPageBackgroundFile(null); + } + if (\array_key_exists('page_background_color', $data)) { + $object->setPageBackgroundColor($data['page_background_color']); + unset($data['page_background_color']); + } + if (\array_key_exists('page_background_mode', $data)) { + $object->setPageBackgroundMode($data['page_background_mode']); + unset($data['page_background_mode']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => false]; - } + return $object; } -} else { - class BuilderApplicationThemeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('primaryColor') && null !== $data->getPrimaryColor()) { + $dataArray['primary_color'] = $data->getPrimaryColor(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class === get_class($data); + if ($data->isInitialized('secondaryColor') && null !== $data->getSecondaryColor()) { + $dataArray['secondary_color'] = $data->getSecondaryColor(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('primary_color', $data)) { - $object->setPrimaryColor($data['primary_color']); - unset($data['primary_color']); - } - if (\array_key_exists('secondary_color', $data)) { - $object->setSecondaryColor($data['secondary_color']); - unset($data['secondary_color']); - } - if (\array_key_exists('border_color', $data)) { - $object->setBorderColor($data['border_color']); - unset($data['border_color']); - } - if (\array_key_exists('main_success_color', $data)) { - $object->setMainSuccessColor($data['main_success_color']); - unset($data['main_success_color']); - } - if (\array_key_exists('main_warning_color', $data)) { - $object->setMainWarningColor($data['main_warning_color']); - unset($data['main_warning_color']); - } - if (\array_key_exists('main_error_color', $data)) { - $object->setMainErrorColor($data['main_error_color']); - unset($data['main_error_color']); - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { - $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); - unset($data['page_background_file']); - } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { - $object->setPageBackgroundFile(null); - } - if (\array_key_exists('page_background_color', $data)) { - $object->setPageBackgroundColor($data['page_background_color']); - unset($data['page_background_color']); - } - if (\array_key_exists('page_background_mode', $data)) { - $object->setPageBackgroundMode($data['page_background_mode']); - unset($data['page_background_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('borderColor') && null !== $data->getBorderColor()) { + $dataArray['border_color'] = $data->getBorderColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('primaryColor') && null !== $object->getPrimaryColor()) { - $data['primary_color'] = $object->getPrimaryColor(); - } - if ($object->isInitialized('secondaryColor') && null !== $object->getSecondaryColor()) { - $data['secondary_color'] = $object->getSecondaryColor(); - } - if ($object->isInitialized('borderColor') && null !== $object->getBorderColor()) { - $data['border_color'] = $object->getBorderColor(); - } - if ($object->isInitialized('mainSuccessColor') && null !== $object->getMainSuccessColor()) { - $data['main_success_color'] = $object->getMainSuccessColor(); - } - if ($object->isInitialized('mainWarningColor') && null !== $object->getMainWarningColor()) { - $data['main_warning_color'] = $object->getMainWarningColor(); - } - if ($object->isInitialized('mainErrorColor') && null !== $object->getMainErrorColor()) { - $data['main_error_color'] = $object->getMainErrorColor(); - } - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - if ($object->isInitialized('pageBackgroundFile') && null !== $object->getPageBackgroundFile()) { - $data['page_background_file'] = $this->normalizer->normalize($object->getPageBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('pageBackgroundColor') && null !== $object->getPageBackgroundColor()) { - $data['page_background_color'] = $object->getPageBackgroundColor(); - } - if ($object->isInitialized('pageBackgroundMode') && null !== $object->getPageBackgroundMode()) { - $data['page_background_mode'] = $object->getPageBackgroundMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('mainSuccessColor') && null !== $data->getMainSuccessColor()) { + $dataArray['main_success_color'] = $data->getMainSuccessColor(); + } + if ($data->isInitialized('mainWarningColor') && null !== $data->getMainWarningColor()) { + $dataArray['main_warning_color'] = $data->getMainWarningColor(); + } + if ($data->isInitialized('mainErrorColor') && null !== $data->getMainErrorColor()) { + $dataArray['main_error_color'] = $data->getMainErrorColor(); + } + if ($data->isInitialized('bodyFontFamily') && null !== $data->getBodyFontFamily()) { + $dataArray['body_font_family'] = $data->getBodyFontFamily(); + } + if ($data->isInitialized('bodyFontSize') && null !== $data->getBodyFontSize()) { + $dataArray['body_font_size'] = $data->getBodyFontSize(); + } + if ($data->isInitialized('bodyTextColor') && null !== $data->getBodyTextColor()) { + $dataArray['body_text_color'] = $data->getBodyTextColor(); + } + if ($data->isInitialized('bodyTextAlignment') && null !== $data->getBodyTextAlignment()) { + $dataArray['body_text_alignment'] = $data->getBodyTextAlignment(); + } + if ($data->isInitialized('heading1FontFamily') && null !== $data->getHeading1FontFamily()) { + $dataArray['heading_1_font_family'] = $data->getHeading1FontFamily(); + } + if ($data->isInitialized('heading1FontSize') && null !== $data->getHeading1FontSize()) { + $dataArray['heading_1_font_size'] = $data->getHeading1FontSize(); + } + if ($data->isInitialized('heading1TextColor') && null !== $data->getHeading1TextColor()) { + $dataArray['heading_1_text_color'] = $data->getHeading1TextColor(); + } + if ($data->isInitialized('heading1TextAlignment') && null !== $data->getHeading1TextAlignment()) { + $dataArray['heading_1_text_alignment'] = $data->getHeading1TextAlignment(); + } + if ($data->isInitialized('heading2FontFamily') && null !== $data->getHeading2FontFamily()) { + $dataArray['heading_2_font_family'] = $data->getHeading2FontFamily(); + } + if ($data->isInitialized('heading2FontSize') && null !== $data->getHeading2FontSize()) { + $dataArray['heading_2_font_size'] = $data->getHeading2FontSize(); + } + if ($data->isInitialized('heading2TextColor') && null !== $data->getHeading2TextColor()) { + $dataArray['heading_2_text_color'] = $data->getHeading2TextColor(); + } + if ($data->isInitialized('heading2TextAlignment') && null !== $data->getHeading2TextAlignment()) { + $dataArray['heading_2_text_alignment'] = $data->getHeading2TextAlignment(); + } + if ($data->isInitialized('heading3FontFamily') && null !== $data->getHeading3FontFamily()) { + $dataArray['heading_3_font_family'] = $data->getHeading3FontFamily(); + } + if ($data->isInitialized('heading3FontSize') && null !== $data->getHeading3FontSize()) { + $dataArray['heading_3_font_size'] = $data->getHeading3FontSize(); + } + if ($data->isInitialized('heading3TextColor') && null !== $data->getHeading3TextColor()) { + $dataArray['heading_3_text_color'] = $data->getHeading3TextColor(); + } + if ($data->isInitialized('heading3TextAlignment') && null !== $data->getHeading3TextAlignment()) { + $dataArray['heading_3_text_alignment'] = $data->getHeading3TextAlignment(); + } + if ($data->isInitialized('heading4FontFamily') && null !== $data->getHeading4FontFamily()) { + $dataArray['heading_4_font_family'] = $data->getHeading4FontFamily(); + } + if ($data->isInitialized('heading4FontSize') && null !== $data->getHeading4FontSize()) { + $dataArray['heading_4_font_size'] = $data->getHeading4FontSize(); + } + if ($data->isInitialized('heading4TextColor') && null !== $data->getHeading4TextColor()) { + $dataArray['heading_4_text_color'] = $data->getHeading4TextColor(); + } + if ($data->isInitialized('heading4TextAlignment') && null !== $data->getHeading4TextAlignment()) { + $dataArray['heading_4_text_alignment'] = $data->getHeading4TextAlignment(); + } + if ($data->isInitialized('heading5FontFamily') && null !== $data->getHeading5FontFamily()) { + $dataArray['heading_5_font_family'] = $data->getHeading5FontFamily(); + } + if ($data->isInitialized('heading5FontSize') && null !== $data->getHeading5FontSize()) { + $dataArray['heading_5_font_size'] = $data->getHeading5FontSize(); + } + if ($data->isInitialized('heading5TextColor') && null !== $data->getHeading5TextColor()) { + $dataArray['heading_5_text_color'] = $data->getHeading5TextColor(); + } + if ($data->isInitialized('heading5TextAlignment') && null !== $data->getHeading5TextAlignment()) { + $dataArray['heading_5_text_alignment'] = $data->getHeading5TextAlignment(); + } + if ($data->isInitialized('heading6FontFamily') && null !== $data->getHeading6FontFamily()) { + $dataArray['heading_6_font_family'] = $data->getHeading6FontFamily(); + } + if ($data->isInitialized('heading6FontSize') && null !== $data->getHeading6FontSize()) { + $dataArray['heading_6_font_size'] = $data->getHeading6FontSize(); + } + if ($data->isInitialized('heading6TextColor') && null !== $data->getHeading6TextColor()) { + $dataArray['heading_6_text_color'] = $data->getHeading6TextColor(); + } + if ($data->isInitialized('heading6TextAlignment') && null !== $data->getHeading6TextAlignment()) { + $dataArray['heading_6_text_alignment'] = $data->getHeading6TextAlignment(); + } + if ($data->isInitialized('buttonFontFamily') && null !== $data->getButtonFontFamily()) { + $dataArray['button_font_family'] = $data->getButtonFontFamily(); + } + if ($data->isInitialized('buttonFontSize') && null !== $data->getButtonFontSize()) { + $dataArray['button_font_size'] = $data->getButtonFontSize(); + } + if ($data->isInitialized('buttonAlignment') && null !== $data->getButtonAlignment()) { + $dataArray['button_alignment'] = $data->getButtonAlignment(); + } + if ($data->isInitialized('buttonTextAlignment') && null !== $data->getButtonTextAlignment()) { + $dataArray['button_text_alignment'] = $data->getButtonTextAlignment(); + } + if ($data->isInitialized('buttonWidth') && null !== $data->getButtonWidth()) { + $dataArray['button_width'] = $data->getButtonWidth(); + } + if ($data->isInitialized('buttonBackgroundColor') && null !== $data->getButtonBackgroundColor()) { + $dataArray['button_background_color'] = $data->getButtonBackgroundColor(); + } + if ($data->isInitialized('buttonTextColor') && null !== $data->getButtonTextColor()) { + $dataArray['button_text_color'] = $data->getButtonTextColor(); + } + if ($data->isInitialized('buttonBorderColor') && null !== $data->getButtonBorderColor()) { + $dataArray['button_border_color'] = $data->getButtonBorderColor(); + } + if ($data->isInitialized('buttonBorderSize') && null !== $data->getButtonBorderSize()) { + $dataArray['button_border_size'] = $data->getButtonBorderSize(); + } + if ($data->isInitialized('buttonBorderRadius') && null !== $data->getButtonBorderRadius()) { + $dataArray['button_border_radius'] = $data->getButtonBorderRadius(); + } + if ($data->isInitialized('buttonVerticalPadding') && null !== $data->getButtonVerticalPadding()) { + $dataArray['button_vertical_padding'] = $data->getButtonVerticalPadding(); + } + if ($data->isInitialized('buttonHorizontalPadding') && null !== $data->getButtonHorizontalPadding()) { + $dataArray['button_horizontal_padding'] = $data->getButtonHorizontalPadding(); + } + if ($data->isInitialized('buttonHoverBackgroundColor') && null !== $data->getButtonHoverBackgroundColor()) { + $dataArray['button_hover_background_color'] = $data->getButtonHoverBackgroundColor(); + } + if ($data->isInitialized('buttonHoverTextColor') && null !== $data->getButtonHoverTextColor()) { + $dataArray['button_hover_text_color'] = $data->getButtonHoverTextColor(); + } + if ($data->isInitialized('buttonHoverBorderColor') && null !== $data->getButtonHoverBorderColor()) { + $dataArray['button_hover_border_color'] = $data->getButtonHoverBorderColor(); + } + if ($data->isInitialized('linkFontFamily') && null !== $data->getLinkFontFamily()) { + $dataArray['link_font_family'] = $data->getLinkFontFamily(); + } + if ($data->isInitialized('linkFontSize') && null !== $data->getLinkFontSize()) { + $dataArray['link_font_size'] = $data->getLinkFontSize(); + } + if ($data->isInitialized('linkTextAlignment') && null !== $data->getLinkTextAlignment()) { + $dataArray['link_text_alignment'] = $data->getLinkTextAlignment(); + } + if ($data->isInitialized('linkTextColor') && null !== $data->getLinkTextColor()) { + $dataArray['link_text_color'] = $data->getLinkTextColor(); + } + if ($data->isInitialized('linkHoverTextColor') && null !== $data->getLinkHoverTextColor()) { + $dataArray['link_hover_text_color'] = $data->getLinkHoverTextColor(); + } + if ($data->isInitialized('imageMaxHeight') && null !== $data->getImageMaxHeight()) { + $dataArray['image_max_height'] = $data->getImageMaxHeight(); + } + if ($data->isInitialized('imageAlignment') && null !== $data->getImageAlignment()) { + $dataArray['image_alignment'] = $data->getImageAlignment(); + } + if ($data->isInitialized('imageMaxWidth') && null !== $data->getImageMaxWidth()) { + $dataArray['image_max_width'] = $data->getImageMaxWidth(); + } + if ($data->isInitialized('imageConstraint') && null !== $data->getImageConstraint()) { + $dataArray['image_constraint'] = $data->getImageConstraint(); + } + if ($data->isInitialized('pageBackgroundFile') && null !== $data->getPageBackgroundFile()) { + $dataArray['page_background_file'] = $this->normalizer->normalize($data->getPageBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('pageBackgroundColor') && null !== $data->getPageBackgroundColor()) { + $dataArray['page_background_color'] = $data->getPageBackgroundColor(); + } + if ($data->isInitialized('pageBackgroundMode') && null !== $data->getPageBackgroundMode()) { + $dataArray['page_background_mode'] = $data->getPageBackgroundMode(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => false]; } } diff --git a/generated/Normalizer/BuilderApplicationWorkspaceNormalizer.php b/generated/Normalizer/BuilderApplicationWorkspaceNormalizer.php index 81ea101..c5b04ef 100644 --- a/generated/Normalizer/BuilderApplicationWorkspaceNormalizer.php +++ b/generated/Normalizer/BuilderApplicationWorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderApplicationWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderApplicationWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class BuilderApplicationWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => false]; } } diff --git a/generated/Normalizer/BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer.php b/generated/Normalizer/BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer.php index 9436c3c..57b5dc2 100644 --- a/generated/Normalizer/BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer.php +++ b/generated/Normalizer/BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => false]; - } + return $object; } -} else { - class BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => false]; } } diff --git a/generated/Normalizer/BuilderBaseApplicationCreatePolymorphicNormalizer.php b/generated/Normalizer/BuilderBaseApplicationCreatePolymorphicNormalizer.php index 18ac7ec..78af1a0 100644 --- a/generated/Normalizer/BuilderBaseApplicationCreatePolymorphicNormalizer.php +++ b/generated/Normalizer/BuilderBaseApplicationCreatePolymorphicNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,87 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderBaseApplicationCreatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderBaseApplicationCreatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('init_with_data', $data)) { - $object->setInitWithData($data['init_with_data']); - unset($data['init_with_data']); - } - if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { - $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class, 'json', $context)); - unset($data['favicon_file']); - } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { - $object->setFaviconFile(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic(); + if (\array_key_exists('init_with_data', $data) && \is_int($data['init_with_data'])) { + $data['init_with_data'] = (bool) $data['init_with_data']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('initWithData') && null !== $object->getInitWithData()) { - $data['init_with_data'] = $object->getInitWithData(); - } - if ($object->isInitialized('faviconFile') && null !== $object->getFaviconFile()) { - $data['favicon_file'] = $this->normalizer->normalize($object->getFaviconFile(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('init_with_data', $data)) { + $object->setInitWithData($data['init_with_data']); + unset($data['init_with_data']); + } + if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { + $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class, 'json', $context)); + unset($data['favicon_file']); + } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { + $object->setFaviconFile(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => false]; - } + return $object; } -} else { - class BuilderBaseApplicationCreatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('initWithData') && null !== $data->getInitWithData()) { + $dataArray['init_with_data'] = $data->getInitWithData(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class === get_class($data); + if ($data->isInitialized('faviconFile') && null !== $data->getFaviconFile()) { + $dataArray['favicon_file'] = $this->normalizer->normalize($data->getFaviconFile(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('init_with_data', $data)) { - $object->setInitWithData($data['init_with_data']); - unset($data['init_with_data']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { - $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class, 'json', $context)); - unset($data['favicon_file']); - } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { - $object->setFaviconFile(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('initWithData') && null !== $object->getInitWithData()) { - $data['init_with_data'] = $object->getInitWithData(); - } - if ($object->isInitialized('faviconFile') && null !== $object->getFaviconFile()) { - $data['favicon_file'] = $this->normalizer->normalize($object->getFaviconFile(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => false]; } } diff --git a/generated/Normalizer/BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer.php b/generated/Normalizer/BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer.php index cbee3c5..131952e 100644 --- a/generated/Normalizer/BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer.php +++ b/generated/Normalizer/BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => false]; - } + return $object; } -} else { - class BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => false]; } } diff --git a/generated/Normalizer/BuilderBaseApplicationUpdatePolymorphicNormalizer.php b/generated/Normalizer/BuilderBaseApplicationUpdatePolymorphicNormalizer.php index cddfafa..487aa47 100644 --- a/generated/Normalizer/BuilderBaseApplicationUpdatePolymorphicNormalizer.php +++ b/generated/Normalizer/BuilderBaseApplicationUpdatePolymorphicNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderBaseApplicationUpdatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderBaseApplicationUpdatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { - $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class, 'json', $context)); - unset($data['favicon_file']); - } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { - $object->setFaviconFile(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - if ($object->isInitialized('faviconFile') && null !== $object->getFaviconFile()) { - $data['favicon_file'] = $this->normalizer->normalize($object->getFaviconFile(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { + $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class, 'json', $context)); + unset($data['favicon_file']); + } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { + $object->setFaviconFile(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => false]; - } + return $object; } -} else { - class BuilderBaseApplicationUpdatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('faviconFile') && null !== $data->getFaviconFile()) { + $dataArray['favicon_file'] = $this->normalizer->normalize($data->getFaviconFile(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('favicon_file', $data) && null !== $data['favicon_file']) { - $object->setFaviconFile($this->denormalizer->denormalize($data['favicon_file'], \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class, 'json', $context)); - unset($data['favicon_file']); - } elseif (\array_key_exists('favicon_file', $data) && null === $data['favicon_file']) { - $object->setFaviconFile(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - if ($object->isInitialized('faviconFile') && null !== $object->getFaviconFile()) { - $data['favicon_file'] = $this->normalizer->normalize($object->getFaviconFile(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => false]; } } diff --git a/generated/Normalizer/BuilderWorkflowActionNormalizer.php b/generated/Normalizer/BuilderWorkflowActionNormalizer.php index d55ddf4..b33f22a 100644 --- a/generated/Normalizer/BuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/BuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,167 +20,82 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class BuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class BuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class BuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class === $type; + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['order'] = $data->getOrder(); + $dataArray['event'] = $data->getEvent(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/ButtonConfigBlockButtonNormalizer.php b/generated/Normalizer/ButtonConfigBlockButtonNormalizer.php index 40b2baf..ad277ee 100644 --- a/generated/Normalizer/ButtonConfigBlockButtonNormalizer.php +++ b/generated/Normalizer/ButtonConfigBlockButtonNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,329 +20,163 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonConfigBlockButtonNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonConfigBlockButtonNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('button_font_family', $data)) { + $object->setButtonFontFamily($data['button_font_family']); + unset($data['button_font_family']); + } + if (\array_key_exists('button_font_size', $data)) { + $object->setButtonFontSize($data['button_font_size']); + unset($data['button_font_size']); + } + if (\array_key_exists('button_alignment', $data)) { + $object->setButtonAlignment($data['button_alignment']); + unset($data['button_alignment']); + } + if (\array_key_exists('button_text_alignment', $data)) { + $object->setButtonTextAlignment($data['button_text_alignment']); + unset($data['button_text_alignment']); + } + if (\array_key_exists('button_width', $data)) { + $object->setButtonWidth($data['button_width']); + unset($data['button_width']); + } + if (\array_key_exists('button_background_color', $data)) { + $object->setButtonBackgroundColor($data['button_background_color']); + unset($data['button_background_color']); + } + if (\array_key_exists('button_text_color', $data)) { + $object->setButtonTextColor($data['button_text_color']); + unset($data['button_text_color']); + } + if (\array_key_exists('button_border_color', $data)) { + $object->setButtonBorderColor($data['button_border_color']); + unset($data['button_border_color']); + } + if (\array_key_exists('button_border_size', $data)) { + $object->setButtonBorderSize($data['button_border_size']); + unset($data['button_border_size']); + } + if (\array_key_exists('button_border_radius', $data)) { + $object->setButtonBorderRadius($data['button_border_radius']); + unset($data['button_border_radius']); + } + if (\array_key_exists('button_vertical_padding', $data)) { + $object->setButtonVerticalPadding($data['button_vertical_padding']); + unset($data['button_vertical_padding']); + } + if (\array_key_exists('button_horizontal_padding', $data)) { + $object->setButtonHorizontalPadding($data['button_horizontal_padding']); + unset($data['button_horizontal_padding']); + } + if (\array_key_exists('button_hover_background_color', $data)) { + $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); + unset($data['button_hover_background_color']); + } + if (\array_key_exists('button_hover_text_color', $data)) { + $object->setButtonHoverTextColor($data['button_hover_text_color']); + unset($data['button_hover_text_color']); + } + if (\array_key_exists('button_hover_border_color', $data)) { + $object->setButtonHoverBorderColor($data['button_hover_border_color']); + unset($data['button_hover_border_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => false]; - } + return $object; } -} else { - class ButtonConfigBlockButtonNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('buttonFontFamily') && null !== $data->getButtonFontFamily()) { + $dataArray['button_font_family'] = $data->getButtonFontFamily(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class === get_class($data); + if ($data->isInitialized('buttonFontSize') && null !== $data->getButtonFontSize()) { + $dataArray['button_font_size'] = $data->getButtonFontSize(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('buttonAlignment') && null !== $data->getButtonAlignment()) { + $dataArray['button_alignment'] = $data->getButtonAlignment(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('buttonTextAlignment') && null !== $data->getButtonTextAlignment()) { + $dataArray['button_text_alignment'] = $data->getButtonTextAlignment(); + } + if ($data->isInitialized('buttonWidth') && null !== $data->getButtonWidth()) { + $dataArray['button_width'] = $data->getButtonWidth(); + } + if ($data->isInitialized('buttonBackgroundColor') && null !== $data->getButtonBackgroundColor()) { + $dataArray['button_background_color'] = $data->getButtonBackgroundColor(); + } + if ($data->isInitialized('buttonTextColor') && null !== $data->getButtonTextColor()) { + $dataArray['button_text_color'] = $data->getButtonTextColor(); + } + if ($data->isInitialized('buttonBorderColor') && null !== $data->getButtonBorderColor()) { + $dataArray['button_border_color'] = $data->getButtonBorderColor(); + } + if ($data->isInitialized('buttonBorderSize') && null !== $data->getButtonBorderSize()) { + $dataArray['button_border_size'] = $data->getButtonBorderSize(); + } + if ($data->isInitialized('buttonBorderRadius') && null !== $data->getButtonBorderRadius()) { + $dataArray['button_border_radius'] = $data->getButtonBorderRadius(); + } + if ($data->isInitialized('buttonVerticalPadding') && null !== $data->getButtonVerticalPadding()) { + $dataArray['button_vertical_padding'] = $data->getButtonVerticalPadding(); + } + if ($data->isInitialized('buttonHorizontalPadding') && null !== $data->getButtonHorizontalPadding()) { + $dataArray['button_horizontal_padding'] = $data->getButtonHorizontalPadding(); + } + if ($data->isInitialized('buttonHoverBackgroundColor') && null !== $data->getButtonHoverBackgroundColor()) { + $dataArray['button_hover_background_color'] = $data->getButtonHoverBackgroundColor(); + } + if ($data->isInitialized('buttonHoverTextColor') && null !== $data->getButtonHoverTextColor()) { + $dataArray['button_hover_text_color'] = $data->getButtonHoverTextColor(); + } + if ($data->isInitialized('buttonHoverBorderColor') && null !== $data->getButtonHoverBorderColor()) { + $dataArray['button_hover_border_color'] = $data->getButtonHoverBorderColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => false]; } } diff --git a/generated/Normalizer/ButtonConfigBlockNormalizer.php b/generated/Normalizer/ButtonConfigBlockNormalizer.php index 5db4948..cc7edf6 100644 --- a/generated/Normalizer/ButtonConfigBlockNormalizer.php +++ b/generated/Normalizer/ButtonConfigBlockNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button', $data)) { - $object->setButton($this->denormalizer->denormalize($data['button'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class, 'json', $context)); - unset($data['button']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('button') && null !== $object->getButton()) { - $data['button'] = $this->normalizer->normalize($object->getButton(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('button', $data)) { + $object->setButton($this->denormalizer->denormalize($data['button'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class, 'json', $context)); + unset($data['button']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => false]; - } + return $object; } -} else { - class ButtonConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('button') && null !== $data->getButton()) { + $dataArray['button'] = $this->normalizer->normalize($data->getButton(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button', $data)) { - $object->setButton($this->denormalizer->denormalize($data['button'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class, 'json', $context)); - unset($data['button']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('button') && null !== $object->getButton()) { - $data['button'] = $this->normalizer->normalize($object->getButton(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => false]; } } diff --git a/generated/Normalizer/ButtonElementCreateElementNormalizer.php b/generated/Normalizer/ButtonElementCreateElementNormalizer.php index 857a978..e728be1 100644 --- a/generated/Normalizer/ButtonElementCreateElementNormalizer.php +++ b/generated/Normalizer/ButtonElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,589 +20,293 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => false]; - } + return $object; } -} else { - class ButtonElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/ButtonElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ButtonElementCreateElementStyleBackgroundFileNormalizer.php index 1d56140..ece7ec5 100644 --- a/generated/Normalizer/ButtonElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ButtonElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ButtonElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ButtonElementElementNormalizer.php b/generated/Normalizer/ButtonElementElementNormalizer.php index f42a680..f9227bb 100644 --- a/generated/Normalizer/ButtonElementElementNormalizer.php +++ b/generated/Normalizer/ButtonElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,619 +20,308 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => false]; - } + return $object; } -} else { - class ButtonElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => false]; } } diff --git a/generated/Normalizer/ButtonElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ButtonElementElementStyleBackgroundFileNormalizer.php index c50a2fe..2f00cc4 100644 --- a/generated/Normalizer/ButtonElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ButtonElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ButtonElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ButtonElementPublicElementNormalizer.php b/generated/Normalizer/ButtonElementPublicElementNormalizer.php index dc9a458..1c9b267 100644 --- a/generated/Normalizer/ButtonElementPublicElementNormalizer.php +++ b/generated/Normalizer/ButtonElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,611 +20,304 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => false]; - } + return $object; } -} else { - class ButtonElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/ButtonElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ButtonElementPublicElementStyleBackgroundFileNormalizer.php index 629a2bc..8036759 100644 --- a/generated/Normalizer/ButtonElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ButtonElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ButtonElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ButtonElementUpdateElementNormalizer.php b/generated/Normalizer/ButtonElementUpdateElementNormalizer.php index ff4f03a..66240cc 100644 --- a/generated/Normalizer/ButtonElementUpdateElementNormalizer.php +++ b/generated/Normalizer/ButtonElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,557 +20,277 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => false]; - } + return $object; } -} else { - class ButtonElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/ButtonElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ButtonElementUpdateElementStyleBackgroundFileNormalizer.php index 5514548..e9935d3 100644 --- a/generated/Normalizer/ButtonElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ButtonElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ButtonElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ButtonLinkConfigBlockButtonNormalizer.php b/generated/Normalizer/ButtonLinkConfigBlockButtonNormalizer.php index 73d9137..597d2ed 100644 --- a/generated/Normalizer/ButtonLinkConfigBlockButtonNormalizer.php +++ b/generated/Normalizer/ButtonLinkConfigBlockButtonNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,329 +20,163 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonLinkConfigBlockButtonNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonLinkConfigBlockButtonNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('button_font_family', $data)) { + $object->setButtonFontFamily($data['button_font_family']); + unset($data['button_font_family']); + } + if (\array_key_exists('button_font_size', $data)) { + $object->setButtonFontSize($data['button_font_size']); + unset($data['button_font_size']); + } + if (\array_key_exists('button_alignment', $data)) { + $object->setButtonAlignment($data['button_alignment']); + unset($data['button_alignment']); + } + if (\array_key_exists('button_text_alignment', $data)) { + $object->setButtonTextAlignment($data['button_text_alignment']); + unset($data['button_text_alignment']); + } + if (\array_key_exists('button_width', $data)) { + $object->setButtonWidth($data['button_width']); + unset($data['button_width']); + } + if (\array_key_exists('button_background_color', $data)) { + $object->setButtonBackgroundColor($data['button_background_color']); + unset($data['button_background_color']); + } + if (\array_key_exists('button_text_color', $data)) { + $object->setButtonTextColor($data['button_text_color']); + unset($data['button_text_color']); + } + if (\array_key_exists('button_border_color', $data)) { + $object->setButtonBorderColor($data['button_border_color']); + unset($data['button_border_color']); + } + if (\array_key_exists('button_border_size', $data)) { + $object->setButtonBorderSize($data['button_border_size']); + unset($data['button_border_size']); + } + if (\array_key_exists('button_border_radius', $data)) { + $object->setButtonBorderRadius($data['button_border_radius']); + unset($data['button_border_radius']); + } + if (\array_key_exists('button_vertical_padding', $data)) { + $object->setButtonVerticalPadding($data['button_vertical_padding']); + unset($data['button_vertical_padding']); + } + if (\array_key_exists('button_horizontal_padding', $data)) { + $object->setButtonHorizontalPadding($data['button_horizontal_padding']); + unset($data['button_horizontal_padding']); + } + if (\array_key_exists('button_hover_background_color', $data)) { + $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); + unset($data['button_hover_background_color']); + } + if (\array_key_exists('button_hover_text_color', $data)) { + $object->setButtonHoverTextColor($data['button_hover_text_color']); + unset($data['button_hover_text_color']); + } + if (\array_key_exists('button_hover_border_color', $data)) { + $object->setButtonHoverBorderColor($data['button_hover_border_color']); + unset($data['button_hover_border_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => false]; - } + return $object; } -} else { - class ButtonLinkConfigBlockButtonNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('buttonFontFamily') && null !== $data->getButtonFontFamily()) { + $dataArray['button_font_family'] = $data->getButtonFontFamily(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class === get_class($data); + if ($data->isInitialized('buttonFontSize') && null !== $data->getButtonFontSize()) { + $dataArray['button_font_size'] = $data->getButtonFontSize(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('buttonAlignment') && null !== $data->getButtonAlignment()) { + $dataArray['button_alignment'] = $data->getButtonAlignment(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('buttonTextAlignment') && null !== $data->getButtonTextAlignment()) { + $dataArray['button_text_alignment'] = $data->getButtonTextAlignment(); + } + if ($data->isInitialized('buttonWidth') && null !== $data->getButtonWidth()) { + $dataArray['button_width'] = $data->getButtonWidth(); + } + if ($data->isInitialized('buttonBackgroundColor') && null !== $data->getButtonBackgroundColor()) { + $dataArray['button_background_color'] = $data->getButtonBackgroundColor(); + } + if ($data->isInitialized('buttonTextColor') && null !== $data->getButtonTextColor()) { + $dataArray['button_text_color'] = $data->getButtonTextColor(); + } + if ($data->isInitialized('buttonBorderColor') && null !== $data->getButtonBorderColor()) { + $dataArray['button_border_color'] = $data->getButtonBorderColor(); + } + if ($data->isInitialized('buttonBorderSize') && null !== $data->getButtonBorderSize()) { + $dataArray['button_border_size'] = $data->getButtonBorderSize(); + } + if ($data->isInitialized('buttonBorderRadius') && null !== $data->getButtonBorderRadius()) { + $dataArray['button_border_radius'] = $data->getButtonBorderRadius(); + } + if ($data->isInitialized('buttonVerticalPadding') && null !== $data->getButtonVerticalPadding()) { + $dataArray['button_vertical_padding'] = $data->getButtonVerticalPadding(); + } + if ($data->isInitialized('buttonHorizontalPadding') && null !== $data->getButtonHorizontalPadding()) { + $dataArray['button_horizontal_padding'] = $data->getButtonHorizontalPadding(); + } + if ($data->isInitialized('buttonHoverBackgroundColor') && null !== $data->getButtonHoverBackgroundColor()) { + $dataArray['button_hover_background_color'] = $data->getButtonHoverBackgroundColor(); + } + if ($data->isInitialized('buttonHoverTextColor') && null !== $data->getButtonHoverTextColor()) { + $dataArray['button_hover_text_color'] = $data->getButtonHoverTextColor(); + } + if ($data->isInitialized('buttonHoverBorderColor') && null !== $data->getButtonHoverBorderColor()) { + $dataArray['button_hover_border_color'] = $data->getButtonHoverBorderColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => false]; } } diff --git a/generated/Normalizer/ButtonLinkConfigBlockLinkNormalizer.php b/generated/Normalizer/ButtonLinkConfigBlockLinkNormalizer.php index cb43ba9..d76e565 100644 --- a/generated/Normalizer/ButtonLinkConfigBlockLinkNormalizer.php +++ b/generated/Normalizer/ButtonLinkConfigBlockLinkNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,189 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonLinkConfigBlockLinkNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonLinkConfigBlockLinkNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('link_font_family', $data)) { + $object->setLinkFontFamily($data['link_font_family']); + unset($data['link_font_family']); + } + if (\array_key_exists('link_font_size', $data)) { + $object->setLinkFontSize($data['link_font_size']); + unset($data['link_font_size']); + } + if (\array_key_exists('link_text_alignment', $data)) { + $object->setLinkTextAlignment($data['link_text_alignment']); + unset($data['link_text_alignment']); + } + if (\array_key_exists('link_text_color', $data)) { + $object->setLinkTextColor($data['link_text_color']); + unset($data['link_text_color']); + } + if (\array_key_exists('link_hover_text_color', $data)) { + $object->setLinkHoverTextColor($data['link_hover_text_color']); + unset($data['link_hover_text_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => false]; - } + return $object; } -} else { - class ButtonLinkConfigBlockLinkNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('linkFontFamily') && null !== $data->getLinkFontFamily()) { + $dataArray['link_font_family'] = $data->getLinkFontFamily(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class === get_class($data); + if ($data->isInitialized('linkFontSize') && null !== $data->getLinkFontSize()) { + $dataArray['link_font_size'] = $data->getLinkFontSize(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('linkTextAlignment') && null !== $data->getLinkTextAlignment()) { + $dataArray['link_text_alignment'] = $data->getLinkTextAlignment(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('linkTextColor') && null !== $data->getLinkTextColor()) { + $dataArray['link_text_color'] = $data->getLinkTextColor(); + } + if ($data->isInitialized('linkHoverTextColor') && null !== $data->getLinkHoverTextColor()) { + $dataArray['link_hover_text_color'] = $data->getLinkHoverTextColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => false]; } } diff --git a/generated/Normalizer/ButtonLinkConfigBlockNormalizer.php b/generated/Normalizer/ButtonLinkConfigBlockNormalizer.php index 7b5cc1e..dc17843 100644 --- a/generated/Normalizer/ButtonLinkConfigBlockNormalizer.php +++ b/generated/Normalizer/ButtonLinkConfigBlockNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonLinkConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonLinkConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button', $data)) { - $object->setButton($this->denormalizer->denormalize($data['button'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class, 'json', $context)); - unset($data['button']); - } - if (\array_key_exists('link', $data)) { - $object->setLink($this->denormalizer->denormalize($data['link'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class, 'json', $context)); - unset($data['link']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('button') && null !== $object->getButton()) { - $data['button'] = $this->normalizer->normalize($object->getButton(), 'json', $context); - } - if ($object->isInitialized('link') && null !== $object->getLink()) { - $data['link'] = $this->normalizer->normalize($object->getLink(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('button', $data)) { + $object->setButton($this->denormalizer->denormalize($data['button'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class, 'json', $context)); + unset($data['button']); + } + if (\array_key_exists('link', $data)) { + $object->setLink($this->denormalizer->denormalize($data['link'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class, 'json', $context)); + unset($data['link']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => false]; - } + return $object; } -} else { - class ButtonLinkConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('button') && null !== $data->getButton()) { + $dataArray['button'] = $this->normalizer->normalize($data->getButton(), 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class === get_class($data); + if ($data->isInitialized('link') && null !== $data->getLink()) { + $dataArray['link'] = $this->normalizer->normalize($data->getLink(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button', $data)) { - $object->setButton($this->denormalizer->denormalize($data['button'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class, 'json', $context)); - unset($data['button']); - } - if (\array_key_exists('link', $data)) { - $object->setLink($this->denormalizer->denormalize($data['link'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class, 'json', $context)); - unset($data['link']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('button') && null !== $object->getButton()) { - $data['button'] = $this->normalizer->normalize($object->getButton(), 'json', $context); - } - if ($object->isInitialized('link') && null !== $object->getLink()) { - $data['link'] = $this->normalizer->normalize($object->getLink(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => false]; } } diff --git a/generated/Normalizer/ButtonThemeConfigBlockNormalizer.php b/generated/Normalizer/ButtonThemeConfigBlockNormalizer.php index 54c49e3..f234a6a 100644 --- a/generated/Normalizer/ButtonThemeConfigBlockNormalizer.php +++ b/generated/Normalizer/ButtonThemeConfigBlockNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,329 +20,163 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ButtonThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ButtonThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('button_font_family', $data)) { + $object->setButtonFontFamily($data['button_font_family']); + unset($data['button_font_family']); + } + if (\array_key_exists('button_font_size', $data)) { + $object->setButtonFontSize($data['button_font_size']); + unset($data['button_font_size']); + } + if (\array_key_exists('button_alignment', $data)) { + $object->setButtonAlignment($data['button_alignment']); + unset($data['button_alignment']); + } + if (\array_key_exists('button_text_alignment', $data)) { + $object->setButtonTextAlignment($data['button_text_alignment']); + unset($data['button_text_alignment']); + } + if (\array_key_exists('button_width', $data)) { + $object->setButtonWidth($data['button_width']); + unset($data['button_width']); + } + if (\array_key_exists('button_background_color', $data)) { + $object->setButtonBackgroundColor($data['button_background_color']); + unset($data['button_background_color']); + } + if (\array_key_exists('button_text_color', $data)) { + $object->setButtonTextColor($data['button_text_color']); + unset($data['button_text_color']); + } + if (\array_key_exists('button_border_color', $data)) { + $object->setButtonBorderColor($data['button_border_color']); + unset($data['button_border_color']); + } + if (\array_key_exists('button_border_size', $data)) { + $object->setButtonBorderSize($data['button_border_size']); + unset($data['button_border_size']); + } + if (\array_key_exists('button_border_radius', $data)) { + $object->setButtonBorderRadius($data['button_border_radius']); + unset($data['button_border_radius']); + } + if (\array_key_exists('button_vertical_padding', $data)) { + $object->setButtonVerticalPadding($data['button_vertical_padding']); + unset($data['button_vertical_padding']); + } + if (\array_key_exists('button_horizontal_padding', $data)) { + $object->setButtonHorizontalPadding($data['button_horizontal_padding']); + unset($data['button_horizontal_padding']); + } + if (\array_key_exists('button_hover_background_color', $data)) { + $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); + unset($data['button_hover_background_color']); + } + if (\array_key_exists('button_hover_text_color', $data)) { + $object->setButtonHoverTextColor($data['button_hover_text_color']); + unset($data['button_hover_text_color']); + } + if (\array_key_exists('button_hover_border_color', $data)) { + $object->setButtonHoverBorderColor($data['button_hover_border_color']); + unset($data['button_hover_border_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => false]; - } + return $object; } -} else { - class ButtonThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('buttonFontFamily') && null !== $data->getButtonFontFamily()) { + $dataArray['button_font_family'] = $data->getButtonFontFamily(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class === get_class($data); + if ($data->isInitialized('buttonFontSize') && null !== $data->getButtonFontSize()) { + $dataArray['button_font_size'] = $data->getButtonFontSize(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('buttonAlignment') && null !== $data->getButtonAlignment()) { + $dataArray['button_alignment'] = $data->getButtonAlignment(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('buttonTextAlignment') && null !== $data->getButtonTextAlignment()) { + $dataArray['button_text_alignment'] = $data->getButtonTextAlignment(); + } + if ($data->isInitialized('buttonWidth') && null !== $data->getButtonWidth()) { + $dataArray['button_width'] = $data->getButtonWidth(); + } + if ($data->isInitialized('buttonBackgroundColor') && null !== $data->getButtonBackgroundColor()) { + $dataArray['button_background_color'] = $data->getButtonBackgroundColor(); + } + if ($data->isInitialized('buttonTextColor') && null !== $data->getButtonTextColor()) { + $dataArray['button_text_color'] = $data->getButtonTextColor(); + } + if ($data->isInitialized('buttonBorderColor') && null !== $data->getButtonBorderColor()) { + $dataArray['button_border_color'] = $data->getButtonBorderColor(); + } + if ($data->isInitialized('buttonBorderSize') && null !== $data->getButtonBorderSize()) { + $dataArray['button_border_size'] = $data->getButtonBorderSize(); + } + if ($data->isInitialized('buttonBorderRadius') && null !== $data->getButtonBorderRadius()) { + $dataArray['button_border_radius'] = $data->getButtonBorderRadius(); + } + if ($data->isInitialized('buttonVerticalPadding') && null !== $data->getButtonVerticalPadding()) { + $dataArray['button_vertical_padding'] = $data->getButtonVerticalPadding(); + } + if ($data->isInitialized('buttonHorizontalPadding') && null !== $data->getButtonHorizontalPadding()) { + $dataArray['button_horizontal_padding'] = $data->getButtonHorizontalPadding(); + } + if ($data->isInitialized('buttonHoverBackgroundColor') && null !== $data->getButtonHoverBackgroundColor()) { + $dataArray['button_hover_background_color'] = $data->getButtonHoverBackgroundColor(); + } + if ($data->isInitialized('buttonHoverTextColor') && null !== $data->getButtonHoverTextColor()) { + $dataArray['button_hover_text_color'] = $data->getButtonHoverTextColor(); + } + if ($data->isInitialized('buttonHoverBorderColor') && null !== $data->getButtonHoverBorderColor()) { + $dataArray['button_hover_border_color'] = $data->getButtonHoverBorderColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => false]; } } diff --git a/generated/Normalizer/CalendarViewCreateViewNormalizer.php b/generated/Normalizer/CalendarViewCreateViewNormalizer.php index ac27571..c15b710 100644 --- a/generated/Normalizer/CalendarViewCreateViewNormalizer.php +++ b/generated/Normalizer/CalendarViewCreateViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,221 +20,115 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CalendarViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CalendarViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { - $object->setDateField($data['date_field']); - unset($data['date_field']); - } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { - $object->setDateField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('dateField') && null !== $object->getDateField()) { - $data['date_field'] = $object->getDateField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { + $object->setDateField($data['date_field']); + unset($data['date_field']); + } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { + $object->setDateField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => false]; - } + return $object; } -} else { - class CalendarViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { - $object->setDateField($data['date_field']); - unset($data['date_field']); - } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { - $object->setDateField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('dateField') && null !== $object->getDateField()) { - $data['date_field'] = $object->getDateField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateField') && null !== $data->getDateField()) { + $dataArray['date_field'] = $data->getDateField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => false]; } } diff --git a/generated/Normalizer/CalendarViewExampleResponseNormalizer.php b/generated/Normalizer/CalendarViewExampleResponseNormalizer.php index b2fd357..83d5e87 100644 --- a/generated/Normalizer/CalendarViewExampleResponseNormalizer.php +++ b/generated/Normalizer/CalendarViewExampleResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,201 +20,99 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CalendarViewExampleResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CalendarViewExampleResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['rows'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class, 'json', $context); - } - $object->setRows($values); - unset($data['rows']); - } - if (\array_key_exists('field_options', $data)) { - $values_1 = []; - foreach ($data['field_options'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values_1); - unset($data['field_options']); - } - if (\array_key_exists('row_metadata', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['row_metadata'] as $key_1 => $value_2) { - $values_2[$key_1] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); - } - $object->setRowMetadata($values_2); - unset($data['row_metadata']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getRows() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + if (\array_key_exists('rows', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['rows'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class, 'json', $context); } - $data['rows'] = $values; + $object->setRows($values); + unset($data['rows']); + } + if (\array_key_exists('field_options', $data)) { $values_1 = []; - foreach ($object->getFieldOptions() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['field_options'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class, 'json', $context); } - $data['field_options'] = $values_1; - if ($object->isInitialized('rowMetadata') && null !== $object->getRowMetadata()) { - $values_2 = []; - foreach ($object->getRowMetadata() as $key_1 => $value_2) { - $values_2[$key_1] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['row_metadata'] = $values_2; + $object->setFieldOptions($values_1); + unset($data['field_options']); + } + if (\array_key_exists('row_metadata', $data)) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['row_metadata'] as $key_1 => $value_2) { + $values_2[$key_1] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); } - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $object->setRowMetadata($values_2); + unset($data['row_metadata']); + } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => false]; - } + return $object; } -} else { - class CalendarViewExampleResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getRows() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class === get_class($data); + $dataArray['rows'] = $values; + $values_1 = []; + foreach ($data->getFieldOptions() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse(); - if (null === $data || false === \is_array($data)) { - return $object; + $dataArray['field_options'] = $values_1; + if ($data->isInitialized('rowMetadata') && null !== $data->getRowMetadata()) { + $values_2 = []; + foreach ($data->getRowMetadata() as $key_1 => $value_2) { + $values_2[$key_1] = $this->normalizer->normalize($value_2, 'json', $context); } - if (\array_key_exists('rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['rows'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class, 'json', $context); - } - $object->setRows($values); - unset($data['rows']); - } - if (\array_key_exists('field_options', $data)) { - $values_1 = []; - foreach ($data['field_options'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values_1); - unset($data['field_options']); - } - if (\array_key_exists('row_metadata', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['row_metadata'] as $key_1 => $value_2) { - $values_2[$key_1] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); - } - $object->setRowMetadata($values_2); - unset($data['row_metadata']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - - return $object; + $dataArray['row_metadata'] = $values_2; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getRows() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['rows'] = $values; - $values_1 = []; - foreach ($object->getFieldOptions() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['field_options'] = $values_1; - if ($object->isInitialized('rowMetadata') && null !== $object->getRowMetadata()) { - $values_2 = []; - foreach ($object->getRowMetadata() as $key_1 => $value_2) { - $values_2[$key_1] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['row_metadata'] = $values_2; - } - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $dataArray[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => false]; } } diff --git a/generated/Normalizer/CalendarViewExampleResponseStackNormalizer.php b/generated/Normalizer/CalendarViewExampleResponseStackNormalizer.php index 4eae8c8..b9aa213 100644 --- a/generated/Normalizer/CalendarViewExampleResponseStackNormalizer.php +++ b/generated/Normalizer/CalendarViewExampleResponseStackNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CalendarViewExampleResponseStackNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CalendarViewExampleResponseStackNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => false]; - } + return $object; } -} else { - class CalendarViewExampleResponseStackNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => false]; } } diff --git a/generated/Normalizer/CalendarViewFieldOptionsNormalizer.php b/generated/Normalizer/CalendarViewFieldOptionsNormalizer.php index 8c68723..2cb30d2 100644 --- a/generated/Normalizer/CalendarViewFieldOptionsNormalizer.php +++ b/generated/Normalizer/CalendarViewFieldOptionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CalendarViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CalendarViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class, 'json', $context); } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } + $object->setFieldOptions($values); + unset($data['field_options']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => false]; - } + return $object; } -} else { - class CalendarViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } + $dataArray['field_options'] = $values; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => false]; } } diff --git a/generated/Normalizer/CalendarViewUpdateNormalizer.php b/generated/Normalizer/CalendarViewUpdateNormalizer.php index c8f1ca0..89e70f0 100644 --- a/generated/Normalizer/CalendarViewUpdateNormalizer.php +++ b/generated/Normalizer/CalendarViewUpdateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,229 +20,119 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CalendarViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CalendarViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { - $object->setDateField($data['date_field']); - unset($data['date_field']); - } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { - $object->setDateField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('dateField') && null !== $object->getDateField()) { - $data['date_field'] = $object->getDateField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_password', $data)) { + $object->setPublicViewPassword($data['public_view_password']); + unset($data['public_view_password']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { + $object->setDateField($data['date_field']); + unset($data['date_field']); + } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { + $object->setDateField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => false]; - } + return $object; } -} else { - class CalendarViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { - $object->setDateField($data['date_field']); - unset($data['date_field']); - } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { - $object->setDateField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('dateField') && null !== $object->getDateField()) { - $data['date_field'] = $object->getDateField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('publicViewPassword') && null !== $data->getPublicViewPassword()) { + $dataArray['public_view_password'] = $data->getPublicViewPassword(); + } + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); + } + if ($data->isInitialized('dateField') && null !== $data->getDateField()) { + $dataArray['date_field'] = $data->getDateField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => false]; } } diff --git a/generated/Normalizer/CalendarViewViewNormalizer.php b/generated/Normalizer/CalendarViewViewNormalizer.php index ccdd75a..63d1643 100644 --- a/generated/Normalizer/CalendarViewViewNormalizer.php +++ b/generated/Normalizer/CalendarViewViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,437 +20,229 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CalendarViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CalendarViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CalendarViewView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); - } - if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { - $object->setDateField($data['date_field']); - unset($data['date_field']); - } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { - $object->setDateField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public_view_has_password', $data) && \is_int($data['public_view_has_password'])) { + $data['public_view_has_password'] = (bool) $data['public_view_has_password']; + } + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); - } - if ($object->isInitialized('dateField') && null !== $object->getDateField()) { - $data['date_field'] = $object->getDateField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewView::class => false]; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - } -} else { - class CalendarViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CalendarViewView::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CalendarViewView::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CalendarViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('table', $data)) { + $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); + unset($data['table']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); + $object->setFilters($values); + unset($data['filters']); + } + if (\array_key_exists('filter_groups', $data)) { + $values_1 = []; + foreach ($data['filter_groups'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); } - if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { - $object->setDateField($data['date_field']); - unset($data['date_field']); - } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { - $object->setDateField(null); + $object->setFilterGroups($values_1); + unset($data['filter_groups']); + } + if (\array_key_exists('sortings', $data)) { + $values_2 = []; + foreach ($data['sortings'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); + $object->setSortings($values_2); + unset($data['sortings']); + } + if (\array_key_exists('group_bys', $data)) { + $values_3 = []; + foreach ($data['group_bys'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); + $object->setGroupBys($values_3); + unset($data['group_bys']); + } + if (\array_key_exists('decorations', $data)) { + $values_4 = []; + foreach ($data['decorations'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } + $object->setDecorations($values_4); + unset($data['decorations']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_has_password', $data)) { + $object->setPublicViewHasPassword($data['public_view_has_password']); + unset($data['public_view_has_password']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('owned_by_id', $data)) { + $object->setOwnedById($data['owned_by_id']); + unset($data['owned_by_id']); + } + if (\array_key_exists('date_field', $data) && null !== $data['date_field']) { + $object->setDateField($data['date_field']); + unset($data['date_field']); + } elseif (\array_key_exists('date_field', $data) && null === $data['date_field']) { + $object->setDateField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_5; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $dataArray['table'] = $this->normalizer->normalize($data->getTable(), 'json', $context); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); + $dataArray['filters'] = $values; + } + if ($data->isInitialized('filterGroups') && null !== $data->getFilterGroups()) { + $values_1 = []; + foreach ($data->getFilterGroups() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); + $dataArray['filter_groups'] = $values_1; + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values_2 = []; + foreach ($data->getSortings() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - if ($object->isInitialized('dateField') && null !== $object->getDateField()) { - $data['date_field'] = $object->getDateField(); + $dataArray['sortings'] = $values_2; + } + if ($data->isInitialized('groupBys') && null !== $data->getGroupBys()) { + $values_3 = []; + foreach ($data->getGroupBys() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); + $dataArray['group_bys'] = $values_3; + } + if ($data->isInitialized('decorations') && null !== $data->getDecorations()) { + $values_4 = []; + foreach ($data->getDecorations() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } + $dataArray['decorations'] = $values_4; + } + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); + } + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); + } + $dataArray['ownership_type'] = $data->getOwnershipType(); + if ($data->isInitialized('ownedById') && null !== $data->getOwnedById()) { + $dataArray['owned_by_id'] = $data->getOwnedById(); + } + if ($data->isInitialized('dateField') && null !== $data->getDateField()) { + $dataArray['date_field'] = $data->getDateField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_5; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CalendarViewView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CalendarViewView::class => false]; } } diff --git a/generated/Normalizer/ChangePasswordBodyValidationNormalizer.php b/generated/Normalizer/ChangePasswordBodyValidationNormalizer.php index b0a2818..4f270fb 100644 --- a/generated/Normalizer/ChangePasswordBodyValidationNormalizer.php +++ b/generated/Normalizer/ChangePasswordBodyValidationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChangePasswordBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChangePasswordBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('old_password', $data)) { - $object->setOldPassword($data['old_password']); - unset($data['old_password']); - } - if (\array_key_exists('new_password', $data)) { - $object->setNewPassword($data['new_password']); - unset($data['new_password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['old_password'] = $object->getOldPassword(); - $data['new_password'] = $object->getNewPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('old_password', $data)) { + $object->setOldPassword($data['old_password']); + unset($data['old_password']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => false]; + if (\array_key_exists('new_password', $data)) { + $object->setNewPassword($data['new_password']); + unset($data['new_password']); } - } -} else { - class ChangePasswordBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('old_password', $data)) { - $object->setOldPassword($data['old_password']); - unset($data['old_password']); - } - if (\array_key_exists('new_password', $data)) { - $object->setNewPassword($data['new_password']); - unset($data['new_password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['old_password'] = $data->getOldPassword(); + $dataArray['new_password'] = $data->getNewPassword(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['old_password'] = $object->getOldPassword(); - $data['new_password'] = $object->getNewPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => false]; } } diff --git a/generated/Normalizer/CheckboxElementCreateElementNormalizer.php b/generated/Normalizer/CheckboxElementCreateElementNormalizer.php index e53961a..d9867e0 100644 --- a/generated/Normalizer/CheckboxElementCreateElementNormalizer.php +++ b/generated/Normalizer/CheckboxElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,579 +20,291 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CheckboxElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CheckboxElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => false]; - } + return $object; } -} else { - class CheckboxElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/CheckboxElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/CheckboxElementCreateElementStyleBackgroundFileNormalizer.php index 4b122f0..86dff01 100644 --- a/generated/Normalizer/CheckboxElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/CheckboxElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CheckboxElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CheckboxElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class CheckboxElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/CheckboxElementElementNormalizer.php b/generated/Normalizer/CheckboxElementElementNormalizer.php index 70a5c9a..13b7223 100644 --- a/generated/Normalizer/CheckboxElementElementNormalizer.php +++ b/generated/Normalizer/CheckboxElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,609 +20,306 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CheckboxElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CheckboxElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => false]; - } + return $object; } -} else { - class CheckboxElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => false]; } } diff --git a/generated/Normalizer/CheckboxElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/CheckboxElementElementStyleBackgroundFileNormalizer.php index d4f55f9..2cbc9d4 100644 --- a/generated/Normalizer/CheckboxElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/CheckboxElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CheckboxElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CheckboxElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class CheckboxElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/CheckboxElementPublicElementNormalizer.php b/generated/Normalizer/CheckboxElementPublicElementNormalizer.php index e0f310d..fa39c4a 100644 --- a/generated/Normalizer/CheckboxElementPublicElementNormalizer.php +++ b/generated/Normalizer/CheckboxElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,601 +20,302 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CheckboxElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CheckboxElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => false]; - } + return $object; } -} else { - class CheckboxElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/CheckboxElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/CheckboxElementPublicElementStyleBackgroundFileNormalizer.php index 968c133..0ad2fa7 100644 --- a/generated/Normalizer/CheckboxElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/CheckboxElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CheckboxElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CheckboxElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class CheckboxElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/CheckboxElementUpdateElementNormalizer.php b/generated/Normalizer/CheckboxElementUpdateElementNormalizer.php index 5a968dc..3932364 100644 --- a/generated/Normalizer/CheckboxElementUpdateElementNormalizer.php +++ b/generated/Normalizer/CheckboxElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,547 +20,275 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CheckboxElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CheckboxElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => false]; - } + return $object; } -} else { - class CheckboxElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/CheckboxElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/CheckboxElementUpdateElementStyleBackgroundFileNormalizer.php index 0752ebb..a2c3d47 100644 --- a/generated/Normalizer/CheckboxElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/CheckboxElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CheckboxElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CheckboxElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class CheckboxElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ChoiceElementCreateElementNormalizer.php b/generated/Normalizer/ChoiceElementCreateElementNormalizer.php index a1ee8d7..fae3624 100644 --- a/generated/Normalizer/ChoiceElementCreateElementNormalizer.php +++ b/generated/Normalizer/ChoiceElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,693 +20,354 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('options', $data)) { - $values = []; - foreach ($data['options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); - } - $object->setOptions($values); - unset($data['options']); - } - if (\array_key_exists('multiple', $data)) { - $object->setMultiple($data['multiple']); - unset($data['multiple']); - } - if (\array_key_exists('show_as_dropdown', $data)) { - $object->setShowAsDropdown($data['show_as_dropdown']); - unset($data['show_as_dropdown']); - } - if (\array_key_exists('option_type', $data)) { - $object->setOptionType($data['option_type']); - unset($data['option_type']); - } - if (\array_key_exists('formula_value', $data)) { - $object->setFormulaValue($data['formula_value']); - unset($data['formula_value']); - } - if (\array_key_exists('formula_name', $data)) { - $object->setFormulaName($data['formula_name']); - unset($data['formula_name']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('multiple', $data) && \is_int($data['multiple'])) { + $data['multiple'] = (bool) $data['multiple']; + } + if (\array_key_exists('show_as_dropdown', $data) && \is_int($data['show_as_dropdown'])) { + $data['show_as_dropdown'] = (bool) $data['show_as_dropdown']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values = []; - foreach ($object->getOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['options'] = $values; - } - if ($object->isInitialized('multiple') && null !== $object->getMultiple()) { - $data['multiple'] = $object->getMultiple(); - } - if ($object->isInitialized('showAsDropdown') && null !== $object->getShowAsDropdown()) { - $data['show_as_dropdown'] = $object->getShowAsDropdown(); - } - if ($object->isInitialized('optionType') && null !== $object->getOptionType()) { - $data['option_type'] = $object->getOptionType(); - } - if ($object->isInitialized('formulaValue') && null !== $object->getFormulaValue()) { - $data['formula_value'] = $object->getFormulaValue(); - } - if ($object->isInitialized('formulaName') && null !== $object->getFormulaName()) { - $data['formula_name'] = $object->getFormulaName(); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('placeholder', $data)) { + $object->setPlaceholder($data['placeholder']); + unset($data['placeholder']); + } + if (\array_key_exists('options', $data)) { + $values = []; + foreach ($data['options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setOptions($values); + unset($data['options']); + } + if (\array_key_exists('multiple', $data)) { + $object->setMultiple($data['multiple']); + unset($data['multiple']); + } + if (\array_key_exists('show_as_dropdown', $data)) { + $object->setShowAsDropdown($data['show_as_dropdown']); + unset($data['show_as_dropdown']); + } + if (\array_key_exists('option_type', $data)) { + $object->setOptionType($data['option_type']); + unset($data['option_type']); + } + if (\array_key_exists('formula_value', $data)) { + $object->setFormulaValue($data['formula_value']); + unset($data['formula_value']); + } + if (\array_key_exists('formula_name', $data)) { + $object->setFormulaName($data['formula_name']); + unset($data['formula_name']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => false]; - } + return $object; } -} else { - class ChoiceElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('options', $data)) { - $values = []; - foreach ($data['options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); - } - $object->setOptions($values); - unset($data['options']); - } - if (\array_key_exists('multiple', $data)) { - $object->setMultiple($data['multiple']); - unset($data['multiple']); - } - if (\array_key_exists('show_as_dropdown', $data)) { - $object->setShowAsDropdown($data['show_as_dropdown']); - unset($data['show_as_dropdown']); - } - if (\array_key_exists('option_type', $data)) { - $object->setOptionType($data['option_type']); - unset($data['option_type']); - } - if (\array_key_exists('formula_value', $data)) { - $object->setFormulaValue($data['formula_value']); - unset($data['formula_value']); - } - if (\array_key_exists('formula_name', $data)) { - $object->setFormulaName($data['formula_name']); - unset($data['formula_name']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values = []; - foreach ($object->getOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['options'] = $values; - } - if ($object->isInitialized('multiple') && null !== $object->getMultiple()) { - $data['multiple'] = $object->getMultiple(); - } - if ($object->isInitialized('showAsDropdown') && null !== $object->getShowAsDropdown()) { - $data['show_as_dropdown'] = $object->getShowAsDropdown(); - } - if ($object->isInitialized('optionType') && null !== $object->getOptionType()) { - $data['option_type'] = $object->getOptionType(); - } - if ($object->isInitialized('formulaValue') && null !== $object->getFormulaValue()) { - $data['formula_value'] = $object->getFormulaValue(); - } - if ($object->isInitialized('formulaName') && null !== $object->getFormulaName()) { - $data['formula_name'] = $object->getFormulaName(); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + if ($data->isInitialized('placeholder') && null !== $data->getPlaceholder()) { + $dataArray['placeholder'] = $data->getPlaceholder(); + } + if ($data->isInitialized('options') && null !== $data->getOptions()) { + $values = []; + foreach ($data->getOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['options'] = $values; + } + if ($data->isInitialized('multiple') && null !== $data->getMultiple()) { + $dataArray['multiple'] = $data->getMultiple(); + } + if ($data->isInitialized('showAsDropdown') && null !== $data->getShowAsDropdown()) { + $dataArray['show_as_dropdown'] = $data->getShowAsDropdown(); + } + if ($data->isInitialized('optionType') && null !== $data->getOptionType()) { + $dataArray['option_type'] = $data->getOptionType(); + } + if ($data->isInitialized('formulaValue') && null !== $data->getFormulaValue()) { + $dataArray['formula_value'] = $data->getFormulaValue(); + } + if ($data->isInitialized('formulaName') && null !== $data->getFormulaName()) { + $dataArray['formula_name'] = $data->getFormulaName(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/ChoiceElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ChoiceElementCreateElementStyleBackgroundFileNormalizer.php index 3936a03..0adae41 100644 --- a/generated/Normalizer/ChoiceElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ChoiceElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ChoiceElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ChoiceElementElementNormalizer.php b/generated/Normalizer/ChoiceElementElementNormalizer.php index ad30216..ab1acc5 100644 --- a/generated/Normalizer/ChoiceElementElementNormalizer.php +++ b/generated/Normalizer/ChoiceElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,723 +20,369 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('options', $data)) { - $values = []; - foreach ($data['options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); - } - $object->setOptions($values); - unset($data['options']); - } - if (\array_key_exists('multiple', $data)) { - $object->setMultiple($data['multiple']); - unset($data['multiple']); - } - if (\array_key_exists('show_as_dropdown', $data)) { - $object->setShowAsDropdown($data['show_as_dropdown']); - unset($data['show_as_dropdown']); - } - if (\array_key_exists('option_type', $data)) { - $object->setOptionType($data['option_type']); - unset($data['option_type']); - } - if (\array_key_exists('formula_value', $data)) { - $object->setFormulaValue($data['formula_value']); - unset($data['formula_value']); - } - if (\array_key_exists('formula_name', $data)) { - $object->setFormulaName($data['formula_name']); - unset($data['formula_name']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('multiple', $data) && \is_int($data['multiple'])) { + $data['multiple'] = (bool) $data['multiple']; + } + if (\array_key_exists('show_as_dropdown', $data) && \is_int($data['show_as_dropdown'])) { + $data['show_as_dropdown'] = (bool) $data['show_as_dropdown']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values = []; - foreach ($object->getOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['options'] = $values; - } - if ($object->isInitialized('multiple') && null !== $object->getMultiple()) { - $data['multiple'] = $object->getMultiple(); - } - if ($object->isInitialized('showAsDropdown') && null !== $object->getShowAsDropdown()) { - $data['show_as_dropdown'] = $object->getShowAsDropdown(); - } - if ($object->isInitialized('optionType') && null !== $object->getOptionType()) { - $data['option_type'] = $object->getOptionType(); - } - if ($object->isInitialized('formulaValue') && null !== $object->getFormulaValue()) { - $data['formula_value'] = $object->getFormulaValue(); - } - if ($object->isInitialized('formulaName') && null !== $object->getFormulaName()) { - $data['formula_name'] = $object->getFormulaName(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('placeholder', $data)) { + $object->setPlaceholder($data['placeholder']); + unset($data['placeholder']); + } + if (\array_key_exists('options', $data)) { + $values = []; + foreach ($data['options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setOptions($values); + unset($data['options']); + } + if (\array_key_exists('multiple', $data)) { + $object->setMultiple($data['multiple']); + unset($data['multiple']); + } + if (\array_key_exists('show_as_dropdown', $data)) { + $object->setShowAsDropdown($data['show_as_dropdown']); + unset($data['show_as_dropdown']); + } + if (\array_key_exists('option_type', $data)) { + $object->setOptionType($data['option_type']); + unset($data['option_type']); + } + if (\array_key_exists('formula_value', $data)) { + $object->setFormulaValue($data['formula_value']); + unset($data['formula_value']); + } + if (\array_key_exists('formula_name', $data)) { + $object->setFormulaName($data['formula_name']); + unset($data['formula_name']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => false]; - } + return $object; } -} else { - class ChoiceElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('options', $data)) { - $values = []; - foreach ($data['options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); - } - $object->setOptions($values); - unset($data['options']); - } - if (\array_key_exists('multiple', $data)) { - $object->setMultiple($data['multiple']); - unset($data['multiple']); - } - if (\array_key_exists('show_as_dropdown', $data)) { - $object->setShowAsDropdown($data['show_as_dropdown']); - unset($data['show_as_dropdown']); - } - if (\array_key_exists('option_type', $data)) { - $object->setOptionType($data['option_type']); - unset($data['option_type']); - } - if (\array_key_exists('formula_value', $data)) { - $object->setFormulaValue($data['formula_value']); - unset($data['formula_value']); - } - if (\array_key_exists('formula_name', $data)) { - $object->setFormulaName($data['formula_name']); - unset($data['formula_name']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values = []; - foreach ($object->getOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['options'] = $values; - } - if ($object->isInitialized('multiple') && null !== $object->getMultiple()) { - $data['multiple'] = $object->getMultiple(); - } - if ($object->isInitialized('showAsDropdown') && null !== $object->getShowAsDropdown()) { - $data['show_as_dropdown'] = $object->getShowAsDropdown(); - } - if ($object->isInitialized('optionType') && null !== $object->getOptionType()) { - $data['option_type'] = $object->getOptionType(); - } - if ($object->isInitialized('formulaValue') && null !== $object->getFormulaValue()) { - $data['formula_value'] = $object->getFormulaValue(); - } - if ($object->isInitialized('formulaName') && null !== $object->getFormulaName()) { - $data['formula_name'] = $object->getFormulaName(); + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + if ($data->isInitialized('placeholder') && null !== $data->getPlaceholder()) { + $dataArray['placeholder'] = $data->getPlaceholder(); + } + if ($data->isInitialized('options') && null !== $data->getOptions()) { + $values = []; + foreach ($data->getOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['options'] = $values; + } + if ($data->isInitialized('multiple') && null !== $data->getMultiple()) { + $dataArray['multiple'] = $data->getMultiple(); + } + if ($data->isInitialized('showAsDropdown') && null !== $data->getShowAsDropdown()) { + $dataArray['show_as_dropdown'] = $data->getShowAsDropdown(); + } + if ($data->isInitialized('optionType') && null !== $data->getOptionType()) { + $dataArray['option_type'] = $data->getOptionType(); + } + if ($data->isInitialized('formulaValue') && null !== $data->getFormulaValue()) { + $dataArray['formula_value'] = $data->getFormulaValue(); + } + if ($data->isInitialized('formulaName') && null !== $data->getFormulaName()) { + $dataArray['formula_name'] = $data->getFormulaName(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => false]; } } diff --git a/generated/Normalizer/ChoiceElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ChoiceElementElementStyleBackgroundFileNormalizer.php index dede158..886e72c 100644 --- a/generated/Normalizer/ChoiceElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ChoiceElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ChoiceElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ChoiceElementPublicElementNormalizer.php b/generated/Normalizer/ChoiceElementPublicElementNormalizer.php index cce6e67..908d358 100644 --- a/generated/Normalizer/ChoiceElementPublicElementNormalizer.php +++ b/generated/Normalizer/ChoiceElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,715 +20,365 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('options', $data)) { - $values = []; - foreach ($data['options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); - } - $object->setOptions($values); - unset($data['options']); - } - if (\array_key_exists('multiple', $data)) { - $object->setMultiple($data['multiple']); - unset($data['multiple']); - } - if (\array_key_exists('show_as_dropdown', $data)) { - $object->setShowAsDropdown($data['show_as_dropdown']); - unset($data['show_as_dropdown']); - } - if (\array_key_exists('option_type', $data)) { - $object->setOptionType($data['option_type']); - unset($data['option_type']); - } - if (\array_key_exists('formula_value', $data)) { - $object->setFormulaValue($data['formula_value']); - unset($data['formula_value']); - } - if (\array_key_exists('formula_name', $data)) { - $object->setFormulaName($data['formula_name']); - unset($data['formula_name']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('multiple', $data) && \is_int($data['multiple'])) { + $data['multiple'] = (bool) $data['multiple']; + } + if (\array_key_exists('show_as_dropdown', $data) && \is_int($data['show_as_dropdown'])) { + $data['show_as_dropdown'] = (bool) $data['show_as_dropdown']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values = []; - foreach ($object->getOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['options'] = $values; - } - if ($object->isInitialized('multiple') && null !== $object->getMultiple()) { - $data['multiple'] = $object->getMultiple(); - } - if ($object->isInitialized('showAsDropdown') && null !== $object->getShowAsDropdown()) { - $data['show_as_dropdown'] = $object->getShowAsDropdown(); - } - if ($object->isInitialized('optionType') && null !== $object->getOptionType()) { - $data['option_type'] = $object->getOptionType(); - } - if ($object->isInitialized('formulaValue') && null !== $object->getFormulaValue()) { - $data['formula_value'] = $object->getFormulaValue(); - } - if ($object->isInitialized('formulaName') && null !== $object->getFormulaName()) { - $data['formula_name'] = $object->getFormulaName(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('placeholder', $data)) { + $object->setPlaceholder($data['placeholder']); + unset($data['placeholder']); + } + if (\array_key_exists('options', $data)) { + $values = []; + foreach ($data['options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setOptions($values); + unset($data['options']); + } + if (\array_key_exists('multiple', $data)) { + $object->setMultiple($data['multiple']); + unset($data['multiple']); + } + if (\array_key_exists('show_as_dropdown', $data)) { + $object->setShowAsDropdown($data['show_as_dropdown']); + unset($data['show_as_dropdown']); + } + if (\array_key_exists('option_type', $data)) { + $object->setOptionType($data['option_type']); + unset($data['option_type']); + } + if (\array_key_exists('formula_value', $data)) { + $object->setFormulaValue($data['formula_value']); + unset($data['formula_value']); + } + if (\array_key_exists('formula_name', $data)) { + $object->setFormulaName($data['formula_name']); + unset($data['formula_name']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => false]; - } + return $object; } -} else { - class ChoiceElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('options', $data)) { - $values = []; - foreach ($data['options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); - } - $object->setOptions($values); - unset($data['options']); - } - if (\array_key_exists('multiple', $data)) { - $object->setMultiple($data['multiple']); - unset($data['multiple']); - } - if (\array_key_exists('show_as_dropdown', $data)) { - $object->setShowAsDropdown($data['show_as_dropdown']); - unset($data['show_as_dropdown']); - } - if (\array_key_exists('option_type', $data)) { - $object->setOptionType($data['option_type']); - unset($data['option_type']); - } - if (\array_key_exists('formula_value', $data)) { - $object->setFormulaValue($data['formula_value']); - unset($data['formula_value']); - } - if (\array_key_exists('formula_name', $data)) { - $object->setFormulaName($data['formula_name']); - unset($data['formula_name']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values = []; - foreach ($object->getOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['options'] = $values; - } - if ($object->isInitialized('multiple') && null !== $object->getMultiple()) { - $data['multiple'] = $object->getMultiple(); - } - if ($object->isInitialized('showAsDropdown') && null !== $object->getShowAsDropdown()) { - $data['show_as_dropdown'] = $object->getShowAsDropdown(); - } - if ($object->isInitialized('optionType') && null !== $object->getOptionType()) { - $data['option_type'] = $object->getOptionType(); - } - if ($object->isInitialized('formulaValue') && null !== $object->getFormulaValue()) { - $data['formula_value'] = $object->getFormulaValue(); - } - if ($object->isInitialized('formulaName') && null !== $object->getFormulaName()) { - $data['formula_name'] = $object->getFormulaName(); + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + if ($data->isInitialized('placeholder') && null !== $data->getPlaceholder()) { + $dataArray['placeholder'] = $data->getPlaceholder(); + } + if ($data->isInitialized('options') && null !== $data->getOptions()) { + $values = []; + foreach ($data->getOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['options'] = $values; + } + if ($data->isInitialized('multiple') && null !== $data->getMultiple()) { + $dataArray['multiple'] = $data->getMultiple(); + } + if ($data->isInitialized('showAsDropdown') && null !== $data->getShowAsDropdown()) { + $dataArray['show_as_dropdown'] = $data->getShowAsDropdown(); + } + if ($data->isInitialized('optionType') && null !== $data->getOptionType()) { + $dataArray['option_type'] = $data->getOptionType(); + } + if ($data->isInitialized('formulaValue') && null !== $data->getFormulaValue()) { + $dataArray['formula_value'] = $data->getFormulaValue(); + } + if ($data->isInitialized('formulaName') && null !== $data->getFormulaName()) { + $dataArray['formula_name'] = $data->getFormulaName(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/ChoiceElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ChoiceElementPublicElementStyleBackgroundFileNormalizer.php index 77486ae..5e79232 100644 --- a/generated/Normalizer/ChoiceElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ChoiceElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ChoiceElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ChoiceElementUpdateElementNormalizer.php b/generated/Normalizer/ChoiceElementUpdateElementNormalizer.php index 41d5a90..1a5a76f 100644 --- a/generated/Normalizer/ChoiceElementUpdateElementNormalizer.php +++ b/generated/Normalizer/ChoiceElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,661 +20,338 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('options', $data)) { - $values = []; - foreach ($data['options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); - } - $object->setOptions($values); - unset($data['options']); - } - if (\array_key_exists('multiple', $data)) { - $object->setMultiple($data['multiple']); - unset($data['multiple']); - } - if (\array_key_exists('show_as_dropdown', $data)) { - $object->setShowAsDropdown($data['show_as_dropdown']); - unset($data['show_as_dropdown']); - } - if (\array_key_exists('option_type', $data)) { - $object->setOptionType($data['option_type']); - unset($data['option_type']); - } - if (\array_key_exists('formula_value', $data)) { - $object->setFormulaValue($data['formula_value']); - unset($data['formula_value']); - } - if (\array_key_exists('formula_name', $data)) { - $object->setFormulaName($data['formula_name']); - unset($data['formula_name']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('multiple', $data) && \is_int($data['multiple'])) { + $data['multiple'] = (bool) $data['multiple']; + } + if (\array_key_exists('show_as_dropdown', $data) && \is_int($data['show_as_dropdown'])) { + $data['show_as_dropdown'] = (bool) $data['show_as_dropdown']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values = []; - foreach ($object->getOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['options'] = $values; - } - if ($object->isInitialized('multiple') && null !== $object->getMultiple()) { - $data['multiple'] = $object->getMultiple(); - } - if ($object->isInitialized('showAsDropdown') && null !== $object->getShowAsDropdown()) { - $data['show_as_dropdown'] = $object->getShowAsDropdown(); - } - if ($object->isInitialized('optionType') && null !== $object->getOptionType()) { - $data['option_type'] = $object->getOptionType(); - } - if ($object->isInitialized('formulaValue') && null !== $object->getFormulaValue()) { - $data['formula_value'] = $object->getFormulaValue(); - } - if ($object->isInitialized('formulaName') && null !== $object->getFormulaName()) { - $data['formula_name'] = $object->getFormulaName(); + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('placeholder', $data)) { + $object->setPlaceholder($data['placeholder']); + unset($data['placeholder']); + } + if (\array_key_exists('options', $data)) { + $values = []; + foreach ($data['options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setOptions($values); + unset($data['options']); + } + if (\array_key_exists('multiple', $data)) { + $object->setMultiple($data['multiple']); + unset($data['multiple']); + } + if (\array_key_exists('show_as_dropdown', $data)) { + $object->setShowAsDropdown($data['show_as_dropdown']); + unset($data['show_as_dropdown']); + } + if (\array_key_exists('option_type', $data)) { + $object->setOptionType($data['option_type']); + unset($data['option_type']); + } + if (\array_key_exists('formula_value', $data)) { + $object->setFormulaValue($data['formula_value']); + unset($data['formula_value']); + } + if (\array_key_exists('formula_name', $data)) { + $object->setFormulaName($data['formula_name']); + unset($data['formula_name']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => false]; - } + return $object; } -} else { - class ChoiceElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('options', $data)) { - $values = []; - foreach ($data['options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ChoiceOption::class, 'json', $context); - } - $object->setOptions($values); - unset($data['options']); - } - if (\array_key_exists('multiple', $data)) { - $object->setMultiple($data['multiple']); - unset($data['multiple']); - } - if (\array_key_exists('show_as_dropdown', $data)) { - $object->setShowAsDropdown($data['show_as_dropdown']); - unset($data['show_as_dropdown']); - } - if (\array_key_exists('option_type', $data)) { - $object->setOptionType($data['option_type']); - unset($data['option_type']); - } - if (\array_key_exists('formula_value', $data)) { - $object->setFormulaValue($data['formula_value']); - unset($data['formula_value']); - } - if (\array_key_exists('formula_name', $data)) { - $object->setFormulaName($data['formula_name']); - unset($data['formula_name']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values = []; - foreach ($object->getOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['options'] = $values; - } - if ($object->isInitialized('multiple') && null !== $object->getMultiple()) { - $data['multiple'] = $object->getMultiple(); - } - if ($object->isInitialized('showAsDropdown') && null !== $object->getShowAsDropdown()) { - $data['show_as_dropdown'] = $object->getShowAsDropdown(); - } - if ($object->isInitialized('optionType') && null !== $object->getOptionType()) { - $data['option_type'] = $object->getOptionType(); - } - if ($object->isInitialized('formulaValue') && null !== $object->getFormulaValue()) { - $data['formula_value'] = $object->getFormulaValue(); - } - if ($object->isInitialized('formulaName') && null !== $object->getFormulaName()) { - $data['formula_name'] = $object->getFormulaName(); + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + if ($data->isInitialized('placeholder') && null !== $data->getPlaceholder()) { + $dataArray['placeholder'] = $data->getPlaceholder(); + } + if ($data->isInitialized('options') && null !== $data->getOptions()) { + $values = []; + foreach ($data->getOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['options'] = $values; + } + if ($data->isInitialized('multiple') && null !== $data->getMultiple()) { + $dataArray['multiple'] = $data->getMultiple(); + } + if ($data->isInitialized('showAsDropdown') && null !== $data->getShowAsDropdown()) { + $dataArray['show_as_dropdown'] = $data->getShowAsDropdown(); + } + if ($data->isInitialized('optionType') && null !== $data->getOptionType()) { + $dataArray['option_type'] = $data->getOptionType(); + } + if ($data->isInitialized('formulaValue') && null !== $data->getFormulaValue()) { + $dataArray['formula_value'] = $data->getFormulaValue(); + } + if ($data->isInitialized('formulaName') && null !== $data->getFormulaName()) { + $dataArray['formula_name'] = $data->getFormulaName(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/ChoiceElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ChoiceElementUpdateElementStyleBackgroundFileNormalizer.php index adc89a4..65a51d7 100644 --- a/generated/Normalizer/ChoiceElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ChoiceElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ChoiceElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ChoiceOptionNormalizer.php b/generated/Normalizer/ChoiceOptionNormalizer.php index 1189562..3908744 100644 --- a/generated/Normalizer/ChoiceOptionNormalizer.php +++ b/generated/Normalizer/ChoiceOptionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ChoiceOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ChoiceOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ChoiceOption::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceOption::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceOption::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceOption::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceOption(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ChoiceOption(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceOption::class => false]; - } + return $object; } -} else { - class ChoiceOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ChoiceOption::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ChoiceOption::class === get_class($data); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ChoiceOption(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ChoiceOption::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ChoiceOption::class => false]; } } diff --git a/generated/Normalizer/CollaboratorNormalizer.php b/generated/Normalizer/CollaboratorNormalizer.php index 7c31ca9..f4cd958 100644 --- a/generated/Normalizer/CollaboratorNormalizer.php +++ b/generated/Normalizer/CollaboratorNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CollaboratorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CollaboratorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Collaborator::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Collaborator::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Collaborator::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Collaborator::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Collaborator(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Collaborator(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Collaborator::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class CollaboratorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Collaborator::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Collaborator::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Collaborator(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Collaborator::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Collaborator::class => false]; } } diff --git a/generated/Normalizer/CollectionFieldNormalizer.php b/generated/Normalizer/CollectionFieldNormalizer.php index 9fec1ac..2cab911 100644 --- a/generated/Normalizer/CollectionFieldNormalizer.php +++ b/generated/Normalizer/CollectionFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CollectionFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CollectionFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CollectionField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CollectionField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CollectionField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CollectionField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CollectionField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('uid', $data)) { - $object->setUid($data['uid']); - unset($data['uid']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CollectionField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('uid') && null !== $object->getUid()) { - $data['uid'] = $object->getUid(); - } - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CollectionField::class => false]; + if (\array_key_exists('uid', $data)) { + $object->setUid($data['uid']); + unset($data['uid']); } - } -} else { - class CollectionFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CollectionField::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CollectionField::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CollectionField(); - if (null === $data || false === \is_array($data)) { - return $object; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('uid', $data)) { - $object->setUid($data['uid']); - unset($data['uid']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('uid') && null !== $object->getUid()) { - $data['uid'] = $object->getUid(); - } - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('uid') && null !== $data->getUid()) { + $dataArray['uid'] = $data->getUid(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CollectionField::class => false]; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CollectionField::class => false]; } } diff --git a/generated/Normalizer/ColumnElementCreateElementNormalizer.php b/generated/Normalizer/ColumnElementCreateElementNormalizer.php index 0d83aef..bdb0d0c 100644 --- a/generated/Normalizer/ColumnElementCreateElementNormalizer.php +++ b/generated/Normalizer/ColumnElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,579 +20,288 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ColumnElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ColumnElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('column_amount', $data)) { - $object->setColumnAmount($data['column_amount']); - unset($data['column_amount']); - } - if (\array_key_exists('column_gap', $data)) { - $object->setColumnGap($data['column_gap']); - unset($data['column_gap']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('columnAmount') && null !== $object->getColumnAmount()) { - $data['column_amount'] = $object->getColumnAmount(); - } - if ($object->isInitialized('columnGap') && null !== $object->getColumnGap()) { - $data['column_gap'] = $object->getColumnGap(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('column_amount', $data)) { + $object->setColumnAmount($data['column_amount']); + unset($data['column_amount']); + } + if (\array_key_exists('column_gap', $data)) { + $object->setColumnGap($data['column_gap']); + unset($data['column_gap']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => false]; - } + return $object; } -} else { - class ColumnElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('column_amount', $data)) { - $object->setColumnAmount($data['column_amount']); - unset($data['column_amount']); - } - if (\array_key_exists('column_gap', $data)) { - $object->setColumnGap($data['column_gap']); - unset($data['column_gap']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('columnAmount') && null !== $object->getColumnAmount()) { - $data['column_amount'] = $object->getColumnAmount(); - } - if ($object->isInitialized('columnGap') && null !== $object->getColumnGap()) { - $data['column_gap'] = $object->getColumnGap(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('columnAmount') && null !== $data->getColumnAmount()) { + $dataArray['column_amount'] = $data->getColumnAmount(); + } + if ($data->isInitialized('columnGap') && null !== $data->getColumnGap()) { + $dataArray['column_gap'] = $data->getColumnGap(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/ColumnElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ColumnElementCreateElementStyleBackgroundFileNormalizer.php index 44a5139..dbf0df9 100644 --- a/generated/Normalizer/ColumnElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ColumnElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ColumnElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ColumnElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ColumnElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ColumnElementElementNormalizer.php b/generated/Normalizer/ColumnElementElementNormalizer.php index 87f094c..65d4703 100644 --- a/generated/Normalizer/ColumnElementElementNormalizer.php +++ b/generated/Normalizer/ColumnElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,609 +20,303 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ColumnElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ColumnElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('column_amount', $data)) { - $object->setColumnAmount($data['column_amount']); - unset($data['column_amount']); - } - if (\array_key_exists('column_gap', $data)) { - $object->setColumnGap($data['column_gap']); - unset($data['column_gap']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('columnAmount') && null !== $object->getColumnAmount()) { - $data['column_amount'] = $object->getColumnAmount(); - } - if ($object->isInitialized('columnGap') && null !== $object->getColumnGap()) { - $data['column_gap'] = $object->getColumnGap(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('column_amount', $data)) { + $object->setColumnAmount($data['column_amount']); + unset($data['column_amount']); + } + if (\array_key_exists('column_gap', $data)) { + $object->setColumnGap($data['column_gap']); + unset($data['column_gap']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => false]; - } + return $object; } -} else { - class ColumnElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('column_amount', $data)) { - $object->setColumnAmount($data['column_amount']); - unset($data['column_amount']); - } - if (\array_key_exists('column_gap', $data)) { - $object->setColumnGap($data['column_gap']); - unset($data['column_gap']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('columnAmount') && null !== $object->getColumnAmount()) { - $data['column_amount'] = $object->getColumnAmount(); - } - if ($object->isInitialized('columnGap') && null !== $object->getColumnGap()) { - $data['column_gap'] = $object->getColumnGap(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('columnAmount') && null !== $data->getColumnAmount()) { + $dataArray['column_amount'] = $data->getColumnAmount(); + } + if ($data->isInitialized('columnGap') && null !== $data->getColumnGap()) { + $dataArray['column_gap'] = $data->getColumnGap(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => false]; } } diff --git a/generated/Normalizer/ColumnElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ColumnElementElementStyleBackgroundFileNormalizer.php index dad8bf7..103ef4c 100644 --- a/generated/Normalizer/ColumnElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ColumnElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ColumnElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ColumnElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ColumnElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ColumnElementPublicElementNormalizer.php b/generated/Normalizer/ColumnElementPublicElementNormalizer.php index 187c68c..7ce89f4 100644 --- a/generated/Normalizer/ColumnElementPublicElementNormalizer.php +++ b/generated/Normalizer/ColumnElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,601 +20,299 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ColumnElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ColumnElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('column_amount', $data)) { - $object->setColumnAmount($data['column_amount']); - unset($data['column_amount']); - } - if (\array_key_exists('column_gap', $data)) { - $object->setColumnGap($data['column_gap']); - unset($data['column_gap']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('columnAmount') && null !== $object->getColumnAmount()) { - $data['column_amount'] = $object->getColumnAmount(); - } - if ($object->isInitialized('columnGap') && null !== $object->getColumnGap()) { - $data['column_gap'] = $object->getColumnGap(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('column_amount', $data)) { + $object->setColumnAmount($data['column_amount']); + unset($data['column_amount']); + } + if (\array_key_exists('column_gap', $data)) { + $object->setColumnGap($data['column_gap']); + unset($data['column_gap']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => false]; - } + return $object; } -} else { - class ColumnElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('column_amount', $data)) { - $object->setColumnAmount($data['column_amount']); - unset($data['column_amount']); - } - if (\array_key_exists('column_gap', $data)) { - $object->setColumnGap($data['column_gap']); - unset($data['column_gap']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('columnAmount') && null !== $object->getColumnAmount()) { - $data['column_amount'] = $object->getColumnAmount(); - } - if ($object->isInitialized('columnGap') && null !== $object->getColumnGap()) { - $data['column_gap'] = $object->getColumnGap(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('columnAmount') && null !== $data->getColumnAmount()) { + $dataArray['column_amount'] = $data->getColumnAmount(); + } + if ($data->isInitialized('columnGap') && null !== $data->getColumnGap()) { + $dataArray['column_gap'] = $data->getColumnGap(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/ColumnElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ColumnElementPublicElementStyleBackgroundFileNormalizer.php index 76c2f68..6f1f2e1 100644 --- a/generated/Normalizer/ColumnElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ColumnElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ColumnElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ColumnElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ColumnElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ColumnElementUpdateElementNormalizer.php b/generated/Normalizer/ColumnElementUpdateElementNormalizer.php index b8911b3..d7bda6b 100644 --- a/generated/Normalizer/ColumnElementUpdateElementNormalizer.php +++ b/generated/Normalizer/ColumnElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,547 +20,272 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ColumnElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ColumnElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('column_amount', $data)) { - $object->setColumnAmount($data['column_amount']); - unset($data['column_amount']); - } - if (\array_key_exists('column_gap', $data)) { - $object->setColumnGap($data['column_gap']); - unset($data['column_gap']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('columnAmount') && null !== $object->getColumnAmount()) { - $data['column_amount'] = $object->getColumnAmount(); - } - if ($object->isInitialized('columnGap') && null !== $object->getColumnGap()) { - $data['column_gap'] = $object->getColumnGap(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('column_amount', $data)) { + $object->setColumnAmount($data['column_amount']); + unset($data['column_amount']); + } + if (\array_key_exists('column_gap', $data)) { + $object->setColumnGap($data['column_gap']); + unset($data['column_gap']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => false]; - } + return $object; } -} else { - class ColumnElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('column_amount', $data)) { - $object->setColumnAmount($data['column_amount']); - unset($data['column_amount']); - } - if (\array_key_exists('column_gap', $data)) { - $object->setColumnGap($data['column_gap']); - unset($data['column_gap']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('columnAmount') && null !== $object->getColumnAmount()) { - $data['column_amount'] = $object->getColumnAmount(); - } - if ($object->isInitialized('columnGap') && null !== $object->getColumnGap()) { - $data['column_gap'] = $object->getColumnGap(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('columnAmount') && null !== $data->getColumnAmount()) { + $dataArray['column_amount'] = $data->getColumnAmount(); + } + if ($data->isInitialized('columnGap') && null !== $data->getColumnGap()) { + $dataArray['column_gap'] = $data->getColumnGap(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/ColumnElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ColumnElementUpdateElementStyleBackgroundFileNormalizer.php index 38bc494..26d4ba4 100644 --- a/generated/Normalizer/ColumnElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ColumnElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ColumnElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ColumnElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ColumnElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/CombinedThemeConfigBlocksNormalizer.php b/generated/Normalizer/CombinedThemeConfigBlocksNormalizer.php index 443129c..4867b57 100644 --- a/generated/Normalizer/CombinedThemeConfigBlocksNormalizer.php +++ b/generated/Normalizer/CombinedThemeConfigBlocksNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,977 +20,487 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CombinedThemeConfigBlocksNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CombinedThemeConfigBlocksNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('primary_color', $data)) { - $object->setPrimaryColor($data['primary_color']); - unset($data['primary_color']); - } - if (\array_key_exists('secondary_color', $data)) { - $object->setSecondaryColor($data['secondary_color']); - unset($data['secondary_color']); - } - if (\array_key_exists('border_color', $data)) { - $object->setBorderColor($data['border_color']); - unset($data['border_color']); - } - if (\array_key_exists('main_success_color', $data)) { - $object->setMainSuccessColor($data['main_success_color']); - unset($data['main_success_color']); - } - if (\array_key_exists('main_warning_color', $data)) { - $object->setMainWarningColor($data['main_warning_color']); - unset($data['main_warning_color']); - } - if (\array_key_exists('main_error_color', $data)) { - $object->setMainErrorColor($data['main_error_color']); - unset($data['main_error_color']); - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { - $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); - unset($data['page_background_file']); - } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { - $object->setPageBackgroundFile(null); - } - if (\array_key_exists('page_background_color', $data)) { - $object->setPageBackgroundColor($data['page_background_color']); - unset($data['page_background_color']); - } - if (\array_key_exists('page_background_mode', $data)) { - $object->setPageBackgroundMode($data['page_background_mode']); - unset($data['page_background_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('primaryColor') && null !== $object->getPrimaryColor()) { - $data['primary_color'] = $object->getPrimaryColor(); - } - if ($object->isInitialized('secondaryColor') && null !== $object->getSecondaryColor()) { - $data['secondary_color'] = $object->getSecondaryColor(); - } - if ($object->isInitialized('borderColor') && null !== $object->getBorderColor()) { - $data['border_color'] = $object->getBorderColor(); - } - if ($object->isInitialized('mainSuccessColor') && null !== $object->getMainSuccessColor()) { - $data['main_success_color'] = $object->getMainSuccessColor(); - } - if ($object->isInitialized('mainWarningColor') && null !== $object->getMainWarningColor()) { - $data['main_warning_color'] = $object->getMainWarningColor(); - } - if ($object->isInitialized('mainErrorColor') && null !== $object->getMainErrorColor()) { - $data['main_error_color'] = $object->getMainErrorColor(); - } - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - if ($object->isInitialized('pageBackgroundFile') && null !== $object->getPageBackgroundFile()) { - $data['page_background_file'] = $this->normalizer->normalize($object->getPageBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('pageBackgroundColor') && null !== $object->getPageBackgroundColor()) { - $data['page_background_color'] = $object->getPageBackgroundColor(); - } - if ($object->isInitialized('pageBackgroundMode') && null !== $object->getPageBackgroundMode()) { - $data['page_background_mode'] = $object->getPageBackgroundMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('primary_color', $data)) { + $object->setPrimaryColor($data['primary_color']); + unset($data['primary_color']); + } + if (\array_key_exists('secondary_color', $data)) { + $object->setSecondaryColor($data['secondary_color']); + unset($data['secondary_color']); + } + if (\array_key_exists('border_color', $data)) { + $object->setBorderColor($data['border_color']); + unset($data['border_color']); + } + if (\array_key_exists('main_success_color', $data)) { + $object->setMainSuccessColor($data['main_success_color']); + unset($data['main_success_color']); + } + if (\array_key_exists('main_warning_color', $data)) { + $object->setMainWarningColor($data['main_warning_color']); + unset($data['main_warning_color']); + } + if (\array_key_exists('main_error_color', $data)) { + $object->setMainErrorColor($data['main_error_color']); + unset($data['main_error_color']); + } + if (\array_key_exists('body_font_family', $data)) { + $object->setBodyFontFamily($data['body_font_family']); + unset($data['body_font_family']); + } + if (\array_key_exists('body_font_size', $data)) { + $object->setBodyFontSize($data['body_font_size']); + unset($data['body_font_size']); + } + if (\array_key_exists('body_text_color', $data)) { + $object->setBodyTextColor($data['body_text_color']); + unset($data['body_text_color']); + } + if (\array_key_exists('body_text_alignment', $data)) { + $object->setBodyTextAlignment($data['body_text_alignment']); + unset($data['body_text_alignment']); + } + if (\array_key_exists('heading_1_font_family', $data)) { + $object->setHeading1FontFamily($data['heading_1_font_family']); + unset($data['heading_1_font_family']); + } + if (\array_key_exists('heading_1_font_size', $data)) { + $object->setHeading1FontSize($data['heading_1_font_size']); + unset($data['heading_1_font_size']); + } + if (\array_key_exists('heading_1_text_color', $data)) { + $object->setHeading1TextColor($data['heading_1_text_color']); + unset($data['heading_1_text_color']); + } + if (\array_key_exists('heading_1_text_alignment', $data)) { + $object->setHeading1TextAlignment($data['heading_1_text_alignment']); + unset($data['heading_1_text_alignment']); + } + if (\array_key_exists('heading_2_font_family', $data)) { + $object->setHeading2FontFamily($data['heading_2_font_family']); + unset($data['heading_2_font_family']); + } + if (\array_key_exists('heading_2_font_size', $data)) { + $object->setHeading2FontSize($data['heading_2_font_size']); + unset($data['heading_2_font_size']); + } + if (\array_key_exists('heading_2_text_color', $data)) { + $object->setHeading2TextColor($data['heading_2_text_color']); + unset($data['heading_2_text_color']); + } + if (\array_key_exists('heading_2_text_alignment', $data)) { + $object->setHeading2TextAlignment($data['heading_2_text_alignment']); + unset($data['heading_2_text_alignment']); + } + if (\array_key_exists('heading_3_font_family', $data)) { + $object->setHeading3FontFamily($data['heading_3_font_family']); + unset($data['heading_3_font_family']); + } + if (\array_key_exists('heading_3_font_size', $data)) { + $object->setHeading3FontSize($data['heading_3_font_size']); + unset($data['heading_3_font_size']); + } + if (\array_key_exists('heading_3_text_color', $data)) { + $object->setHeading3TextColor($data['heading_3_text_color']); + unset($data['heading_3_text_color']); + } + if (\array_key_exists('heading_3_text_alignment', $data)) { + $object->setHeading3TextAlignment($data['heading_3_text_alignment']); + unset($data['heading_3_text_alignment']); + } + if (\array_key_exists('heading_4_font_family', $data)) { + $object->setHeading4FontFamily($data['heading_4_font_family']); + unset($data['heading_4_font_family']); + } + if (\array_key_exists('heading_4_font_size', $data)) { + $object->setHeading4FontSize($data['heading_4_font_size']); + unset($data['heading_4_font_size']); + } + if (\array_key_exists('heading_4_text_color', $data)) { + $object->setHeading4TextColor($data['heading_4_text_color']); + unset($data['heading_4_text_color']); + } + if (\array_key_exists('heading_4_text_alignment', $data)) { + $object->setHeading4TextAlignment($data['heading_4_text_alignment']); + unset($data['heading_4_text_alignment']); + } + if (\array_key_exists('heading_5_font_family', $data)) { + $object->setHeading5FontFamily($data['heading_5_font_family']); + unset($data['heading_5_font_family']); + } + if (\array_key_exists('heading_5_font_size', $data)) { + $object->setHeading5FontSize($data['heading_5_font_size']); + unset($data['heading_5_font_size']); + } + if (\array_key_exists('heading_5_text_color', $data)) { + $object->setHeading5TextColor($data['heading_5_text_color']); + unset($data['heading_5_text_color']); + } + if (\array_key_exists('heading_5_text_alignment', $data)) { + $object->setHeading5TextAlignment($data['heading_5_text_alignment']); + unset($data['heading_5_text_alignment']); + } + if (\array_key_exists('heading_6_font_family', $data)) { + $object->setHeading6FontFamily($data['heading_6_font_family']); + unset($data['heading_6_font_family']); + } + if (\array_key_exists('heading_6_font_size', $data)) { + $object->setHeading6FontSize($data['heading_6_font_size']); + unset($data['heading_6_font_size']); + } + if (\array_key_exists('heading_6_text_color', $data)) { + $object->setHeading6TextColor($data['heading_6_text_color']); + unset($data['heading_6_text_color']); + } + if (\array_key_exists('heading_6_text_alignment', $data)) { + $object->setHeading6TextAlignment($data['heading_6_text_alignment']); + unset($data['heading_6_text_alignment']); + } + if (\array_key_exists('button_font_family', $data)) { + $object->setButtonFontFamily($data['button_font_family']); + unset($data['button_font_family']); + } + if (\array_key_exists('button_font_size', $data)) { + $object->setButtonFontSize($data['button_font_size']); + unset($data['button_font_size']); + } + if (\array_key_exists('button_alignment', $data)) { + $object->setButtonAlignment($data['button_alignment']); + unset($data['button_alignment']); + } + if (\array_key_exists('button_text_alignment', $data)) { + $object->setButtonTextAlignment($data['button_text_alignment']); + unset($data['button_text_alignment']); + } + if (\array_key_exists('button_width', $data)) { + $object->setButtonWidth($data['button_width']); + unset($data['button_width']); + } + if (\array_key_exists('button_background_color', $data)) { + $object->setButtonBackgroundColor($data['button_background_color']); + unset($data['button_background_color']); + } + if (\array_key_exists('button_text_color', $data)) { + $object->setButtonTextColor($data['button_text_color']); + unset($data['button_text_color']); + } + if (\array_key_exists('button_border_color', $data)) { + $object->setButtonBorderColor($data['button_border_color']); + unset($data['button_border_color']); + } + if (\array_key_exists('button_border_size', $data)) { + $object->setButtonBorderSize($data['button_border_size']); + unset($data['button_border_size']); + } + if (\array_key_exists('button_border_radius', $data)) { + $object->setButtonBorderRadius($data['button_border_radius']); + unset($data['button_border_radius']); + } + if (\array_key_exists('button_vertical_padding', $data)) { + $object->setButtonVerticalPadding($data['button_vertical_padding']); + unset($data['button_vertical_padding']); + } + if (\array_key_exists('button_horizontal_padding', $data)) { + $object->setButtonHorizontalPadding($data['button_horizontal_padding']); + unset($data['button_horizontal_padding']); + } + if (\array_key_exists('button_hover_background_color', $data)) { + $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); + unset($data['button_hover_background_color']); + } + if (\array_key_exists('button_hover_text_color', $data)) { + $object->setButtonHoverTextColor($data['button_hover_text_color']); + unset($data['button_hover_text_color']); + } + if (\array_key_exists('button_hover_border_color', $data)) { + $object->setButtonHoverBorderColor($data['button_hover_border_color']); + unset($data['button_hover_border_color']); + } + if (\array_key_exists('link_font_family', $data)) { + $object->setLinkFontFamily($data['link_font_family']); + unset($data['link_font_family']); + } + if (\array_key_exists('link_font_size', $data)) { + $object->setLinkFontSize($data['link_font_size']); + unset($data['link_font_size']); + } + if (\array_key_exists('link_text_alignment', $data)) { + $object->setLinkTextAlignment($data['link_text_alignment']); + unset($data['link_text_alignment']); + } + if (\array_key_exists('link_text_color', $data)) { + $object->setLinkTextColor($data['link_text_color']); + unset($data['link_text_color']); + } + if (\array_key_exists('link_hover_text_color', $data)) { + $object->setLinkHoverTextColor($data['link_hover_text_color']); + unset($data['link_hover_text_color']); + } + if (\array_key_exists('image_max_height', $data)) { + $object->setImageMaxHeight($data['image_max_height']); + unset($data['image_max_height']); + } + if (\array_key_exists('image_alignment', $data)) { + $object->setImageAlignment($data['image_alignment']); + unset($data['image_alignment']); + } + if (\array_key_exists('image_max_width', $data)) { + $object->setImageMaxWidth($data['image_max_width']); + unset($data['image_max_width']); + } + if (\array_key_exists('image_constraint', $data)) { + $object->setImageConstraint($data['image_constraint']); + unset($data['image_constraint']); + } + if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { + $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); + unset($data['page_background_file']); + } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { + $object->setPageBackgroundFile(null); + } + if (\array_key_exists('page_background_color', $data)) { + $object->setPageBackgroundColor($data['page_background_color']); + unset($data['page_background_color']); + } + if (\array_key_exists('page_background_mode', $data)) { + $object->setPageBackgroundMode($data['page_background_mode']); + unset($data['page_background_mode']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => false]; - } + return $object; } -} else { - class CombinedThemeConfigBlocksNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('primaryColor') && null !== $data->getPrimaryColor()) { + $dataArray['primary_color'] = $data->getPrimaryColor(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class === get_class($data); + if ($data->isInitialized('secondaryColor') && null !== $data->getSecondaryColor()) { + $dataArray['secondary_color'] = $data->getSecondaryColor(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('primary_color', $data)) { - $object->setPrimaryColor($data['primary_color']); - unset($data['primary_color']); - } - if (\array_key_exists('secondary_color', $data)) { - $object->setSecondaryColor($data['secondary_color']); - unset($data['secondary_color']); - } - if (\array_key_exists('border_color', $data)) { - $object->setBorderColor($data['border_color']); - unset($data['border_color']); - } - if (\array_key_exists('main_success_color', $data)) { - $object->setMainSuccessColor($data['main_success_color']); - unset($data['main_success_color']); - } - if (\array_key_exists('main_warning_color', $data)) { - $object->setMainWarningColor($data['main_warning_color']); - unset($data['main_warning_color']); - } - if (\array_key_exists('main_error_color', $data)) { - $object->setMainErrorColor($data['main_error_color']); - unset($data['main_error_color']); - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { - $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); - unset($data['page_background_file']); - } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { - $object->setPageBackgroundFile(null); - } - if (\array_key_exists('page_background_color', $data)) { - $object->setPageBackgroundColor($data['page_background_color']); - unset($data['page_background_color']); - } - if (\array_key_exists('page_background_mode', $data)) { - $object->setPageBackgroundMode($data['page_background_mode']); - unset($data['page_background_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('borderColor') && null !== $data->getBorderColor()) { + $dataArray['border_color'] = $data->getBorderColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('primaryColor') && null !== $object->getPrimaryColor()) { - $data['primary_color'] = $object->getPrimaryColor(); - } - if ($object->isInitialized('secondaryColor') && null !== $object->getSecondaryColor()) { - $data['secondary_color'] = $object->getSecondaryColor(); - } - if ($object->isInitialized('borderColor') && null !== $object->getBorderColor()) { - $data['border_color'] = $object->getBorderColor(); - } - if ($object->isInitialized('mainSuccessColor') && null !== $object->getMainSuccessColor()) { - $data['main_success_color'] = $object->getMainSuccessColor(); - } - if ($object->isInitialized('mainWarningColor') && null !== $object->getMainWarningColor()) { - $data['main_warning_color'] = $object->getMainWarningColor(); - } - if ($object->isInitialized('mainErrorColor') && null !== $object->getMainErrorColor()) { - $data['main_error_color'] = $object->getMainErrorColor(); - } - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - if ($object->isInitialized('pageBackgroundFile') && null !== $object->getPageBackgroundFile()) { - $data['page_background_file'] = $this->normalizer->normalize($object->getPageBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('pageBackgroundColor') && null !== $object->getPageBackgroundColor()) { - $data['page_background_color'] = $object->getPageBackgroundColor(); - } - if ($object->isInitialized('pageBackgroundMode') && null !== $object->getPageBackgroundMode()) { - $data['page_background_mode'] = $object->getPageBackgroundMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('mainSuccessColor') && null !== $data->getMainSuccessColor()) { + $dataArray['main_success_color'] = $data->getMainSuccessColor(); + } + if ($data->isInitialized('mainWarningColor') && null !== $data->getMainWarningColor()) { + $dataArray['main_warning_color'] = $data->getMainWarningColor(); + } + if ($data->isInitialized('mainErrorColor') && null !== $data->getMainErrorColor()) { + $dataArray['main_error_color'] = $data->getMainErrorColor(); + } + if ($data->isInitialized('bodyFontFamily') && null !== $data->getBodyFontFamily()) { + $dataArray['body_font_family'] = $data->getBodyFontFamily(); + } + if ($data->isInitialized('bodyFontSize') && null !== $data->getBodyFontSize()) { + $dataArray['body_font_size'] = $data->getBodyFontSize(); + } + if ($data->isInitialized('bodyTextColor') && null !== $data->getBodyTextColor()) { + $dataArray['body_text_color'] = $data->getBodyTextColor(); + } + if ($data->isInitialized('bodyTextAlignment') && null !== $data->getBodyTextAlignment()) { + $dataArray['body_text_alignment'] = $data->getBodyTextAlignment(); + } + if ($data->isInitialized('heading1FontFamily') && null !== $data->getHeading1FontFamily()) { + $dataArray['heading_1_font_family'] = $data->getHeading1FontFamily(); + } + if ($data->isInitialized('heading1FontSize') && null !== $data->getHeading1FontSize()) { + $dataArray['heading_1_font_size'] = $data->getHeading1FontSize(); + } + if ($data->isInitialized('heading1TextColor') && null !== $data->getHeading1TextColor()) { + $dataArray['heading_1_text_color'] = $data->getHeading1TextColor(); + } + if ($data->isInitialized('heading1TextAlignment') && null !== $data->getHeading1TextAlignment()) { + $dataArray['heading_1_text_alignment'] = $data->getHeading1TextAlignment(); + } + if ($data->isInitialized('heading2FontFamily') && null !== $data->getHeading2FontFamily()) { + $dataArray['heading_2_font_family'] = $data->getHeading2FontFamily(); + } + if ($data->isInitialized('heading2FontSize') && null !== $data->getHeading2FontSize()) { + $dataArray['heading_2_font_size'] = $data->getHeading2FontSize(); + } + if ($data->isInitialized('heading2TextColor') && null !== $data->getHeading2TextColor()) { + $dataArray['heading_2_text_color'] = $data->getHeading2TextColor(); + } + if ($data->isInitialized('heading2TextAlignment') && null !== $data->getHeading2TextAlignment()) { + $dataArray['heading_2_text_alignment'] = $data->getHeading2TextAlignment(); + } + if ($data->isInitialized('heading3FontFamily') && null !== $data->getHeading3FontFamily()) { + $dataArray['heading_3_font_family'] = $data->getHeading3FontFamily(); + } + if ($data->isInitialized('heading3FontSize') && null !== $data->getHeading3FontSize()) { + $dataArray['heading_3_font_size'] = $data->getHeading3FontSize(); + } + if ($data->isInitialized('heading3TextColor') && null !== $data->getHeading3TextColor()) { + $dataArray['heading_3_text_color'] = $data->getHeading3TextColor(); + } + if ($data->isInitialized('heading3TextAlignment') && null !== $data->getHeading3TextAlignment()) { + $dataArray['heading_3_text_alignment'] = $data->getHeading3TextAlignment(); + } + if ($data->isInitialized('heading4FontFamily') && null !== $data->getHeading4FontFamily()) { + $dataArray['heading_4_font_family'] = $data->getHeading4FontFamily(); + } + if ($data->isInitialized('heading4FontSize') && null !== $data->getHeading4FontSize()) { + $dataArray['heading_4_font_size'] = $data->getHeading4FontSize(); + } + if ($data->isInitialized('heading4TextColor') && null !== $data->getHeading4TextColor()) { + $dataArray['heading_4_text_color'] = $data->getHeading4TextColor(); + } + if ($data->isInitialized('heading4TextAlignment') && null !== $data->getHeading4TextAlignment()) { + $dataArray['heading_4_text_alignment'] = $data->getHeading4TextAlignment(); + } + if ($data->isInitialized('heading5FontFamily') && null !== $data->getHeading5FontFamily()) { + $dataArray['heading_5_font_family'] = $data->getHeading5FontFamily(); + } + if ($data->isInitialized('heading5FontSize') && null !== $data->getHeading5FontSize()) { + $dataArray['heading_5_font_size'] = $data->getHeading5FontSize(); + } + if ($data->isInitialized('heading5TextColor') && null !== $data->getHeading5TextColor()) { + $dataArray['heading_5_text_color'] = $data->getHeading5TextColor(); + } + if ($data->isInitialized('heading5TextAlignment') && null !== $data->getHeading5TextAlignment()) { + $dataArray['heading_5_text_alignment'] = $data->getHeading5TextAlignment(); + } + if ($data->isInitialized('heading6FontFamily') && null !== $data->getHeading6FontFamily()) { + $dataArray['heading_6_font_family'] = $data->getHeading6FontFamily(); + } + if ($data->isInitialized('heading6FontSize') && null !== $data->getHeading6FontSize()) { + $dataArray['heading_6_font_size'] = $data->getHeading6FontSize(); + } + if ($data->isInitialized('heading6TextColor') && null !== $data->getHeading6TextColor()) { + $dataArray['heading_6_text_color'] = $data->getHeading6TextColor(); + } + if ($data->isInitialized('heading6TextAlignment') && null !== $data->getHeading6TextAlignment()) { + $dataArray['heading_6_text_alignment'] = $data->getHeading6TextAlignment(); + } + if ($data->isInitialized('buttonFontFamily') && null !== $data->getButtonFontFamily()) { + $dataArray['button_font_family'] = $data->getButtonFontFamily(); + } + if ($data->isInitialized('buttonFontSize') && null !== $data->getButtonFontSize()) { + $dataArray['button_font_size'] = $data->getButtonFontSize(); + } + if ($data->isInitialized('buttonAlignment') && null !== $data->getButtonAlignment()) { + $dataArray['button_alignment'] = $data->getButtonAlignment(); + } + if ($data->isInitialized('buttonTextAlignment') && null !== $data->getButtonTextAlignment()) { + $dataArray['button_text_alignment'] = $data->getButtonTextAlignment(); + } + if ($data->isInitialized('buttonWidth') && null !== $data->getButtonWidth()) { + $dataArray['button_width'] = $data->getButtonWidth(); + } + if ($data->isInitialized('buttonBackgroundColor') && null !== $data->getButtonBackgroundColor()) { + $dataArray['button_background_color'] = $data->getButtonBackgroundColor(); + } + if ($data->isInitialized('buttonTextColor') && null !== $data->getButtonTextColor()) { + $dataArray['button_text_color'] = $data->getButtonTextColor(); + } + if ($data->isInitialized('buttonBorderColor') && null !== $data->getButtonBorderColor()) { + $dataArray['button_border_color'] = $data->getButtonBorderColor(); + } + if ($data->isInitialized('buttonBorderSize') && null !== $data->getButtonBorderSize()) { + $dataArray['button_border_size'] = $data->getButtonBorderSize(); + } + if ($data->isInitialized('buttonBorderRadius') && null !== $data->getButtonBorderRadius()) { + $dataArray['button_border_radius'] = $data->getButtonBorderRadius(); + } + if ($data->isInitialized('buttonVerticalPadding') && null !== $data->getButtonVerticalPadding()) { + $dataArray['button_vertical_padding'] = $data->getButtonVerticalPadding(); + } + if ($data->isInitialized('buttonHorizontalPadding') && null !== $data->getButtonHorizontalPadding()) { + $dataArray['button_horizontal_padding'] = $data->getButtonHorizontalPadding(); + } + if ($data->isInitialized('buttonHoverBackgroundColor') && null !== $data->getButtonHoverBackgroundColor()) { + $dataArray['button_hover_background_color'] = $data->getButtonHoverBackgroundColor(); + } + if ($data->isInitialized('buttonHoverTextColor') && null !== $data->getButtonHoverTextColor()) { + $dataArray['button_hover_text_color'] = $data->getButtonHoverTextColor(); + } + if ($data->isInitialized('buttonHoverBorderColor') && null !== $data->getButtonHoverBorderColor()) { + $dataArray['button_hover_border_color'] = $data->getButtonHoverBorderColor(); + } + if ($data->isInitialized('linkFontFamily') && null !== $data->getLinkFontFamily()) { + $dataArray['link_font_family'] = $data->getLinkFontFamily(); + } + if ($data->isInitialized('linkFontSize') && null !== $data->getLinkFontSize()) { + $dataArray['link_font_size'] = $data->getLinkFontSize(); + } + if ($data->isInitialized('linkTextAlignment') && null !== $data->getLinkTextAlignment()) { + $dataArray['link_text_alignment'] = $data->getLinkTextAlignment(); + } + if ($data->isInitialized('linkTextColor') && null !== $data->getLinkTextColor()) { + $dataArray['link_text_color'] = $data->getLinkTextColor(); + } + if ($data->isInitialized('linkHoverTextColor') && null !== $data->getLinkHoverTextColor()) { + $dataArray['link_hover_text_color'] = $data->getLinkHoverTextColor(); + } + if ($data->isInitialized('imageMaxHeight') && null !== $data->getImageMaxHeight()) { + $dataArray['image_max_height'] = $data->getImageMaxHeight(); + } + if ($data->isInitialized('imageAlignment') && null !== $data->getImageAlignment()) { + $dataArray['image_alignment'] = $data->getImageAlignment(); + } + if ($data->isInitialized('imageMaxWidth') && null !== $data->getImageMaxWidth()) { + $dataArray['image_max_width'] = $data->getImageMaxWidth(); + } + if ($data->isInitialized('imageConstraint') && null !== $data->getImageConstraint()) { + $dataArray['image_constraint'] = $data->getImageConstraint(); + } + if ($data->isInitialized('pageBackgroundFile') && null !== $data->getPageBackgroundFile()) { + $dataArray['page_background_file'] = $this->normalizer->normalize($data->getPageBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('pageBackgroundColor') && null !== $data->getPageBackgroundColor()) { + $dataArray['page_background_color'] = $data->getPageBackgroundColor(); + } + if ($data->isInitialized('pageBackgroundMode') && null !== $data->getPageBackgroundMode()) { + $dataArray['page_background_mode'] = $data->getPageBackgroundMode(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => false]; } } diff --git a/generated/Normalizer/CombinedThemeConfigBlocksPageBackgroundFileNormalizer.php b/generated/Normalizer/CombinedThemeConfigBlocksPageBackgroundFileNormalizer.php index 246b987..ea8a933 100644 --- a/generated/Normalizer/CombinedThemeConfigBlocksPageBackgroundFileNormalizer.php +++ b/generated/Normalizer/CombinedThemeConfigBlocksPageBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CombinedThemeConfigBlocksPageBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CombinedThemeConfigBlocksPageBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => false]; - } + return $object; } -} else { - class CombinedThemeConfigBlocksPageBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ConditionalColorValueProviderConfColorFilterGroupNormalizer.php b/generated/Normalizer/ConditionalColorValueProviderConfColorFilterGroupNormalizer.php index 0fd830a..c06401e 100644 --- a/generated/Normalizer/ConditionalColorValueProviderConfColorFilterGroupNormalizer.php +++ b/generated/Normalizer/ConditionalColorValueProviderConfColorFilterGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ConditionalColorValueProviderConfColorFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ConditionalColorValueProviderConfColorFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { - $object->setParentGroup($data['parent_group']); - unset($data['parent_group']); - } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { - $object->setParentGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('parentGroup') && null !== $object->getParentGroup()) { - $data['parent_group'] = $object->getParentGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { + $object->setParentGroup($data['parent_group']); + unset($data['parent_group']); + } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { + $object->setParentGroup(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => false]; - } + return $object; } -} else { - class ConditionalColorValueProviderConfColorFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class === get_class($data); + if ($data->isInitialized('parentGroup') && null !== $data->getParentGroup()) { + $dataArray['parent_group'] = $data->getParentGroup(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { - $object->setParentGroup($data['parent_group']); - unset($data['parent_group']); - } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { - $object->setParentGroup(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('parentGroup') && null !== $object->getParentGroup()) { - $data['parent_group'] = $object->getParentGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => false]; } } diff --git a/generated/Normalizer/ConditionalColorValueProviderConfColorFilterNormalizer.php b/generated/Normalizer/ConditionalColorValueProviderConfColorFilterNormalizer.php index 9d10ff4..3139621 100644 --- a/generated/Normalizer/ConditionalColorValueProviderConfColorFilterNormalizer.php +++ b/generated/Normalizer/ConditionalColorValueProviderConfColorFilterNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,189 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ConditionalColorValueProviderConfColorFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ConditionalColorValueProviderConfColorFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('field', $data) && null !== $data['field']) { - $object->setField($data['field']); - unset($data['field']); - } elseif (\array_key_exists('field', $data) && null === $data['field']) { - $object->setField(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - unset($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('field', $data) && null !== $data['field']) { + $object->setField($data['field']); + unset($data['field']); + } elseif (\array_key_exists('field', $data) && null === $data['field']) { + $object->setField(null); + } + if (\array_key_exists('type', $data) && null !== $data['type']) { + $object->setType($data['type']); + unset($data['type']); + } elseif (\array_key_exists('type', $data) && null === $data['type']) { + $object->setType(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $object->setGroup($data['group']); + unset($data['group']); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => false]; - } + return $object; } -} else { - class ConditionalColorValueProviderConfColorFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['field'] = $data->getField(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class === get_class($data); + if ($data->isInitialized('group') && null !== $data->getGroup()) { + $dataArray['group'] = $data->getGroup(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('field', $data) && null !== $data['field']) { - $object->setField($data['field']); - unset($data['field']); - } elseif (\array_key_exists('field', $data) && null === $data['field']) { - $object->setField(null); - } - if (\array_key_exists('type', $data) && null !== $data['type']) { - $object->setType($data['type']); - unset($data['type']); - } elseif (\array_key_exists('type', $data) && null === $data['type']) { - $object->setType(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => false]; } } diff --git a/generated/Normalizer/ConditionalColorValueProviderConfColorNormalizer.php b/generated/Normalizer/ConditionalColorValueProviderConfColorNormalizer.php index 3b5321a..03e9940 100644 --- a/generated/Normalizer/ConditionalColorValueProviderConfColorNormalizer.php +++ b/generated/Normalizer/ConditionalColorValueProviderConfColorNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,209 +20,103 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ConditionalColorValueProviderConfColorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ConditionalColorValueProviderConfColorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('operator', $data)) { - $object->setOperator($data['operator']); - unset($data['operator']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['color'] = $object->getColor(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('color', $data)) { + $object->setColor($data['color']); + unset($data['color']); + } + if (\array_key_exists('filters', $data)) { $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class, 'json', $context); } - $data['filters'] = $values; - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('operator') && null !== $object->getOperator()) { - $data['operator'] = $object->getOperator(); + $object->setFilters($values); + unset($data['filters']); + } + if (\array_key_exists('filter_groups', $data)) { + $values_1 = []; + foreach ($data['filter_groups'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setFilterGroups($values_1); + unset($data['filter_groups']); + } + if (\array_key_exists('operator', $data)) { + $object->setOperator($data['operator']); + unset($data['operator']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => false]; - } + return $object; } -} else { - class ConditionalColorValueProviderConfColorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['color'] = $data->getColor(); + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('operator', $data)) { - $object->setOperator($data['operator']); - unset($data['operator']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } + $dataArray['filters'] = $values; + if ($data->isInitialized('filterGroups') && null !== $data->getFilterGroups()) { + $values_1 = []; + foreach ($data->getFilterGroups() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - return $object; + $dataArray['filter_groups'] = $values_1; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['color'] = $object->getColor(); - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('operator') && null !== $object->getOperator()) { - $data['operator'] = $object->getOperator(); - } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + if ($data->isInitialized('operator') && null !== $data->getOperator()) { + $dataArray['operator'] = $data->getOperator(); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => false]; } } diff --git a/generated/Normalizer/ConditionalColorValueProviderConfColorsNormalizer.php b/generated/Normalizer/ConditionalColorValueProviderConfColorsNormalizer.php index 092b111..8d6849b 100644 --- a/generated/Normalizer/ConditionalColorValueProviderConfColorsNormalizer.php +++ b/generated/Normalizer/ConditionalColorValueProviderConfColorsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ConditionalColorValueProviderConfColorsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ConditionalColorValueProviderConfColorsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('colors', $data)) { - $values = []; - foreach ($data['colors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); - } - $object->setColors($values); - unset($data['colors']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('colors', $data)) { $values = []; - foreach ($object->getColors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['colors'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); } - $data['colors'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setColors($values); + unset($data['colors']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => false]; - } + return $object; } -} else { - class ConditionalColorValueProviderConfColorsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getColors() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['colors'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('colors', $data)) { - $values = []; - foreach ($data['colors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); - } - $object->setColors($values); - unset($data['colors']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getColors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['colors'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => false]; } } diff --git a/generated/Normalizer/CountFieldCreateFieldNormalizer.php b/generated/Normalizer/CountFieldCreateFieldNormalizer.php index b916a27..2272625 100644 --- a/generated/Normalizer/CountFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/CountFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,359 +20,187 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CountFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CountFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CountFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CountFieldCreateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => false]; - } + return $object; } -} else { - class CountFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class === get_class($data); + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CountFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/CountFieldFieldNormalizer.php b/generated/Normalizer/CountFieldFieldNormalizer.php index ba2e354..f7fcf63 100644 --- a/generated/Normalizer/CountFieldFieldNormalizer.php +++ b/generated/Normalizer/CountFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,405 +20,216 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CountFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CountFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CountFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CountFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CountFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CountFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CountFieldField::class => false]; - } + return $object; } -} else { - class CountFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CountFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CountFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CountFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CountFieldField::class => false]; } } diff --git a/generated/Normalizer/CountFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/CountFieldFieldSerializerWithRelatedFieldsNormalizer.php index 42da531..b4535ac 100644 --- a/generated/Normalizer/CountFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/CountFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,421 +20,224 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CountFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CountFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class CountFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/CountFieldUpdateFieldNormalizer.php b/generated/Normalizer/CountFieldUpdateFieldNormalizer.php index a3e8b01..1c44f39 100644 --- a/generated/Normalizer/CountFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/CountFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,367 +20,191 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CountFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CountFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => false]; - } + return $object; } -} else { - class CountFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/CreatePageNormalizer.php b/generated/Normalizer/CreatePageNormalizer.php index a3e2584..6672f34 100644 --- a/generated/Normalizer/CreatePageNormalizer.php +++ b/generated/Normalizer/CreatePageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,169 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatePageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatePageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatePage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatePage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatePage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatePage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatePage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatePage(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('path', $data)) { + $object->setPath($data['path']); + unset($data['path']); + } + if (\array_key_exists('path_params', $data)) { + $values = []; + foreach ($data['path_params'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPathParams($values); + unset($data['path_params']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatePage::class => false]; - } + return $object; } -} else { - class CreatePageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatePage::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatePage::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['path'] = $data->getPath(); + if ($data->isInitialized('pathParams') && null !== $data->getPathParams()) { + $values = []; + foreach ($data->getPathParams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['path_params'] = $values; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatePage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatePage::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatePage::class => false]; } } diff --git a/generated/Normalizer/CreateRoleAssignmentNormalizer.php b/generated/Normalizer/CreateRoleAssignmentNormalizer.php index f3c8d06..1430c16 100644 --- a/generated/Normalizer/CreateRoleAssignmentNormalizer.php +++ b/generated/Normalizer/CreateRoleAssignmentNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,173 +20,85 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - if (\array_key_exists('role', $data) && null !== $data['role']) { - $object->setRole($data['role']); - unset($data['role']); - } elseif (\array_key_exists('role', $data) && null === $data['role']) { - $object->setRole(null); - } - if (\array_key_exists('scope_id', $data)) { - $object->setScopeId($data['scope_id']); - unset($data['scope_id']); - } - if (\array_key_exists('scope_type', $data)) { - $object->setScopeType($data['scope_type']); - unset($data['scope_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['subject_id'] = $object->getSubjectId(); - $data['subject_type'] = $object->getSubjectType(); - $data['role'] = $object->getRole(); - $data['scope_id'] = $object->getScopeId(); - $data['scope_type'] = $object->getScopeType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('subject_id', $data)) { + $object->setSubjectId($data['subject_id']); + unset($data['subject_id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => false]; + if (\array_key_exists('subject_type', $data)) { + $object->setSubjectType($data['subject_type']); + unset($data['subject_type']); } - } -} else { - class CreateRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class === $type; + if (\array_key_exists('role', $data) && null !== $data['role']) { + $object->setRole($data['role']); + unset($data['role']); + } elseif (\array_key_exists('role', $data) && null === $data['role']) { + $object->setRole(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class === get_class($data); + if (\array_key_exists('scope_id', $data)) { + $object->setScopeId($data['scope_id']); + unset($data['scope_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - if (\array_key_exists('role', $data) && null !== $data['role']) { - $object->setRole($data['role']); - unset($data['role']); - } elseif (\array_key_exists('role', $data) && null === $data['role']) { - $object->setRole(null); - } - if (\array_key_exists('scope_id', $data)) { - $object->setScopeId($data['scope_id']); - unset($data['scope_id']); - } - if (\array_key_exists('scope_type', $data)) { - $object->setScopeType($data['scope_type']); - unset($data['scope_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('scope_type', $data)) { + $object->setScopeType($data['scope_type']); + unset($data['scope_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['subject_id'] = $object->getSubjectId(); - $data['subject_type'] = $object->getSubjectType(); - $data['role'] = $object->getRole(); - $data['scope_id'] = $object->getScopeId(); - $data['scope_type'] = $object->getScopeType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['subject_id'] = $data->getSubjectId(); + $dataArray['subject_type'] = $data->getSubjectType(); + $dataArray['role'] = $data->getRole(); + $dataArray['scope_id'] = $data->getScopeId(); + $dataArray['scope_type'] = $data->getScopeType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => false]; } } diff --git a/generated/Normalizer/CreateRowRequestNormalizer.php b/generated/Normalizer/CreateRowRequestNormalizer.php index b7ab605..6eec0ae 100644 --- a/generated/Normalizer/CreateRowRequestNormalizer.php +++ b/generated/Normalizer/CreateRowRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,119 +20,58 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateRowRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateRowRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => false]; - } + return $object; } -} else { - class CreateRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class === get_class($data); - } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateRowRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => false]; } } diff --git a/generated/Normalizer/CreateSnapshotJobCreateJobNormalizer.php b/generated/Normalizer/CreateSnapshotJobCreateJobNormalizer.php index f4dba36..aaa1a8a 100644 --- a/generated/Normalizer/CreateSnapshotJobCreateJobNormalizer.php +++ b/generated/Normalizer/CreateSnapshotJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateSnapshotJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateSnapshotJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => false]; - } + return $object; } -} else { - class CreateSnapshotJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/CreateSnapshotJobJobNormalizer.php b/generated/Normalizer/CreateSnapshotJobJobNormalizer.php index c56faf8..2cbd5bf 100644 --- a/generated/Normalizer/CreateSnapshotJobJobNormalizer.php +++ b/generated/Normalizer/CreateSnapshotJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,169 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateSnapshotJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateSnapshotJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class CreateSnapshotJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => false]; } } diff --git a/generated/Normalizer/CreateViewFilterGroupNormalizer.php b/generated/Normalizer/CreateViewFilterGroupNormalizer.php index 89f98bf..4c8c748 100644 --- a/generated/Normalizer/CreateViewFilterGroupNormalizer.php +++ b/generated/Normalizer/CreateViewFilterGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { - $object->setParentGroup($data['parent_group']); - unset($data['parent_group']); - } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { - $object->setParentGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('parentGroup') && null !== $object->getParentGroup()) { - $data['parent_group'] = $object->getParentGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { + $object->setParentGroup($data['parent_group']); + unset($data['parent_group']); + } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { + $object->setParentGroup(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => false]; - } + return $object; } -} else { - class CreateViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class === get_class($data); + if ($data->isInitialized('parentGroup') && null !== $data->getParentGroup()) { + $dataArray['parent_group'] = $data->getParentGroup(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { - $object->setParentGroup($data['parent_group']); - unset($data['parent_group']); - } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { - $object->setParentGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('parentGroup') && null !== $object->getParentGroup()) { - $data['parent_group'] = $object->getParentGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => false]; } } diff --git a/generated/Normalizer/CreateViewFilterNormalizer.php b/generated/Normalizer/CreateViewFilterNormalizer.php index 1b545d0..92bc051 100644 --- a/generated/Normalizer/CreateViewFilterNormalizer.php +++ b/generated/Normalizer/CreateViewFilterNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateViewFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateViewFilter(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $object->setGroup($data['group']); + unset($data['group']); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => false]; - } + return $object; } -} else { - class CreateViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field'] = $data->getField(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class === get_class($data); + if ($data->isInitialized('group') && null !== $data->getGroup()) { + $dataArray['group'] = $data->getGroup(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateViewFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => false]; } } diff --git a/generated/Normalizer/CreateViewGroupByNormalizer.php b/generated/Normalizer/CreateViewGroupByNormalizer.php index 09c5960..6138b21 100644 --- a/generated/Normalizer/CreateViewGroupByNormalizer.php +++ b/generated/Normalizer/CreateViewGroupByNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => false]; - } + return $object; } -} else { - class CreateViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field'] = $data->getField(); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class === get_class($data); + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => false]; } } diff --git a/generated/Normalizer/CreateViewSortNormalizer.php b/generated/Normalizer/CreateViewSortNormalizer.php index b191a8a..2aa2eea 100644 --- a/generated/Normalizer/CreateViewSortNormalizer.php +++ b/generated/Normalizer/CreateViewSortNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,143 +20,70 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateViewSort::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateViewSort::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewSort::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewSort::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateViewSort(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateViewSort(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateViewSort::class => false]; - } + return $object; } -} else { - class CreateViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateViewSort::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateViewSort::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field'] = $data->getField(); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateViewSort(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateViewSort::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateViewSort::class => false]; } } diff --git a/generated/Normalizer/CreateWorkspaceInvitationNormalizer.php b/generated/Normalizer/CreateWorkspaceInvitationNormalizer.php index 6cb4731..d826584 100644 --- a/generated/Normalizer/CreateWorkspaceInvitationNormalizer.php +++ b/generated/Normalizer/CreateWorkspaceInvitationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,167 +20,82 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreateWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreateWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - if (\array_key_exists('base_url', $data)) { - $object->setBaseUrl($data['base_url']); - unset($data['base_url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['email'] = $object->getEmail(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - if ($object->isInitialized('message') && null !== $object->getMessage()) { - $data['message'] = $object->getMessage(); - } - $data['base_url'] = $object->getBaseUrl(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); + } + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); + } + if (\array_key_exists('message', $data)) { + $object->setMessage($data['message']); + unset($data['message']); + } + if (\array_key_exists('base_url', $data)) { + $object->setBaseUrl($data['base_url']); + unset($data['base_url']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => false]; - } + return $object; } -} else { - class CreateWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['email'] = $data->getEmail(); + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $data->getPermissions(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class === get_class($data); + if ($data->isInitialized('message') && null !== $data->getMessage()) { + $dataArray['message'] = $data->getMessage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - if (\array_key_exists('base_url', $data)) { - $object->setBaseUrl($data['base_url']); - unset($data['base_url']); + $dataArray['base_url'] = $data->getBaseUrl(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['email'] = $object->getEmail(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - if ($object->isInitialized('message') && null !== $object->getMessage()) { - $data['message'] = $object->getMessage(); - } - $data['base_url'] = $object->getBaseUrl(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => false]; } } diff --git a/generated/Normalizer/CreatedByFieldCreateFieldNormalizer.php b/generated/Normalizer/CreatedByFieldCreateFieldNormalizer.php index 656b96b..95dc9f5 100644 --- a/generated/Normalizer/CreatedByFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/CreatedByFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatedByFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatedByFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class CreatedByFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/CreatedByFieldFieldNormalizer.php b/generated/Normalizer/CreatedByFieldFieldNormalizer.php index 9902e93..7412abe 100644 --- a/generated/Normalizer/CreatedByFieldFieldNormalizer.php +++ b/generated/Normalizer/CreatedByFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatedByFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatedByFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => false]; - } + return $object; } -} else { - class CreatedByFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => false]; } } diff --git a/generated/Normalizer/CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer.php index 76650e0..a4a17ee 100644 --- a/generated/Normalizer/CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/CreatedByFieldUpdateFieldNormalizer.php b/generated/Normalizer/CreatedByFieldUpdateFieldNormalizer.php index 36504de..b296721 100644 --- a/generated/Normalizer/CreatedByFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/CreatedByFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatedByFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatedByFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => false]; - } + return $object; } -} else { - class CreatedByFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/CreatedOnFieldCreateFieldNormalizer.php b/generated/Normalizer/CreatedOnFieldCreateFieldNormalizer.php index 3fed010..3c647dd 100644 --- a/generated/Normalizer/CreatedOnFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/CreatedOnFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,253 +20,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatedOnFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatedOnFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); + unset($data['date_force_timezone_offset']); + } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => false]; - } + return $object; } -} else { - class CreatedOnFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('dateForceTimezoneOffset') && null !== $data->getDateForceTimezoneOffset()) { + $dataArray['date_force_timezone_offset'] = $data->getDateForceTimezoneOffset(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/CreatedOnFieldFieldNormalizer.php b/generated/Normalizer/CreatedOnFieldFieldNormalizer.php index 1b70f16..4b50ba7 100644 --- a/generated/Normalizer/CreatedOnFieldFieldNormalizer.php +++ b/generated/Normalizer/CreatedOnFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,277 +20,149 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatedOnFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatedOnFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => false]; - } + return $object; } -} else { - class CreatedOnFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => false]; } } diff --git a/generated/Normalizer/CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer.php index 53a3408..9eecc09 100644 --- a/generated/Normalizer/CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,297 +20,159 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class === get_class($data); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/CreatedOnFieldUpdateFieldNormalizer.php b/generated/Normalizer/CreatedOnFieldUpdateFieldNormalizer.php index 4b4acb0..387d7ed 100644 --- a/generated/Normalizer/CreatedOnFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/CreatedOnFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,257 +20,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CreatedOnFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CreatedOnFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); + unset($data['date_force_timezone_offset']); + } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => false]; - } + return $object; } -} else { - class CreatedOnFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('dateForceTimezoneOffset') && null !== $data->getDateForceTimezoneOffset()) { + $dataArray['date_force_timezone_offset'] = $data->getDateForceTimezoneOffset(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/CsvExporterOptionsNormalizer.php b/generated/Normalizer/CsvExporterOptionsNormalizer.php index dc221e5..974d5ed 100644 --- a/generated/Normalizer/CsvExporterOptionsNormalizer.php +++ b/generated/Normalizer/CsvExporterOptionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,189 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CsvExporterOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CsvExporterOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CsvExporterOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('exporter_type', $data)) { - $object->setExporterType($data['exporter_type']); - unset($data['exporter_type']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_include_header', $data)) { - $object->setCsvIncludeHeader($data['csv_include_header']); - unset($data['csv_include_header']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CsvExporterOptions(); + if (\array_key_exists('csv_include_header', $data) && \is_int($data['csv_include_header'])) { + $data['csv_include_header'] = (bool) $data['csv_include_header']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('viewId') && null !== $object->getViewId()) { - $data['view_id'] = $object->getViewId(); - } - $data['exporter_type'] = $object->getExporterType(); - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvIncludeHeader') && null !== $object->getCsvIncludeHeader()) { - $data['csv_include_header'] = $object->getCsvIncludeHeader(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('exporter_type', $data)) { + $object->setExporterType($data['exporter_type']); + unset($data['exporter_type']); + } + if (\array_key_exists('export_charset', $data)) { + $object->setExportCharset($data['export_charset']); + unset($data['export_charset']); + } + if (\array_key_exists('csv_column_separator', $data)) { + $object->setCsvColumnSeparator($data['csv_column_separator']); + unset($data['csv_column_separator']); + } + if (\array_key_exists('csv_include_header', $data)) { + $object->setCsvIncludeHeader($data['csv_include_header']); + unset($data['csv_include_header']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => false]; - } + return $object; } -} else { - class CsvExporterOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('viewId') && null !== $data->getViewId()) { + $dataArray['view_id'] = $data->getViewId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class === get_class($data); + $dataArray['exporter_type'] = $data->getExporterType(); + if ($data->isInitialized('exportCharset') && null !== $data->getExportCharset()) { + $dataArray['export_charset'] = $data->getExportCharset(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CsvExporterOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('exporter_type', $data)) { - $object->setExporterType($data['exporter_type']); - unset($data['exporter_type']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_include_header', $data)) { - $object->setCsvIncludeHeader($data['csv_include_header']); - unset($data['csv_include_header']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('csvColumnSeparator') && null !== $data->getCsvColumnSeparator()) { + $dataArray['csv_column_separator'] = $data->getCsvColumnSeparator(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('viewId') && null !== $object->getViewId()) { - $data['view_id'] = $object->getViewId(); - } - $data['exporter_type'] = $object->getExporterType(); - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvIncludeHeader') && null !== $object->getCsvIncludeHeader()) { - $data['csv_include_header'] = $object->getCsvIncludeHeader(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('csvIncludeHeader') && null !== $data->getCsvIncludeHeader()) { + $dataArray['csv_include_header'] = $data->getCsvIncludeHeader(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => false]; } } diff --git a/generated/Normalizer/CustomDomainCreateDomainNormalizer.php b/generated/Normalizer/CustomDomainCreateDomainNormalizer.php index 41ae63e..98e378b 100644 --- a/generated/Normalizer/CustomDomainCreateDomainNormalizer.php +++ b/generated/Normalizer/CustomDomainCreateDomainNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CustomDomainCreateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CustomDomainCreateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - $data['domain_name'] = $object->getDomainName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => false]; + if (\array_key_exists('domain_name', $data)) { + $object->setDomainName($data['domain_name']); + unset($data['domain_name']); } - } -} else { - class CustomDomainCreateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + $dataArray['domain_name'] = $data->getDomainName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - $data['domain_name'] = $object->getDomainName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => false]; } } diff --git a/generated/Normalizer/CustomDomainDomainNormalizer.php b/generated/Normalizer/CustomDomainDomainNormalizer.php index d21af38..ef4ead2 100644 --- a/generated/Normalizer/CustomDomainDomainNormalizer.php +++ b/generated/Normalizer/CustomDomainDomainNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,181 +20,89 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class CustomDomainDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class CustomDomainDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CustomDomainDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - if (\array_key_exists('last_published', $data) && null !== $data['last_published']) { - $object->setLastPublished(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_published'])); - unset($data['last_published']); - } elseif (\array_key_exists('last_published', $data) && null === $data['last_published']) { - $object->setLastPublished(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\CustomDomainDomain(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['domain_name'] = $object->getDomainName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('lastPublished') && null !== $object->getLastPublished()) { - $data['last_published'] = $object->getLastPublished()->format('Y-m-d\TH:i:sP'); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class CustomDomainDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class === $type; + if (\array_key_exists('domain_name', $data)) { + $object->setDomainName($data['domain_name']); + unset($data['domain_name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\CustomDomainDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - if (\array_key_exists('last_published', $data) && null !== $data['last_published']) { - $object->setLastPublished(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_published'])); - unset($data['last_published']); - } elseif (\array_key_exists('last_published', $data) && null === $data['last_published']) { - $object->setLastPublished(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('builder_id', $data)) { + $object->setBuilderId($data['builder_id']); + unset($data['builder_id']); + } + if (\array_key_exists('last_published', $data) && null !== $data['last_published']) { + $object->setLastPublished(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_published'])); + unset($data['last_published']); + } elseif (\array_key_exists('last_published', $data) && null === $data['last_published']) { + $object->setLastPublished(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['domain_name'] = $object->getDomainName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('lastPublished') && null !== $object->getLastPublished()) { - $data['last_published'] = $object->getLastPublished()->format('Y-m-d\TH:i:sP'); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['domain_name'] = $data->getDomainName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('lastPublished') && null !== $data->getLastPublished()) { + $dataArray['last_published'] = $data->getLastPublished()->format('Y-m-d\TH:i:sP'); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => false]; } } diff --git a/generated/Normalizer/DashboardNormalizer.php b/generated/Normalizer/DashboardNormalizer.php index c528418..5e0d077 100644 --- a/generated/Normalizer/DashboardNormalizer.php +++ b/generated/Normalizer/DashboardNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DashboardNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DashboardNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Dashboard::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Dashboard::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Dashboard::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Dashboard::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Dashboard(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('group_invitations', $data)) { - $values = []; - foreach ($data['group_invitations'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class, 'json', $context); - } - $object->setGroupInvitations($values); - unset($data['group_invitations']); - } - if (\array_key_exists('workspace_invitations', $data)) { - $values_1 = []; - foreach ($data['workspace_invitations'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class, 'json', $context); - } - $object->setWorkspaceInvitations($values_1); - unset($data['workspace_invitations']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Dashboard(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('group_invitations', $data)) { $values = []; - foreach ($object->getGroupInvitations() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['group_invitations'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class, 'json', $context); } - $data['group_invitations'] = $values; + $object->setGroupInvitations($values); + unset($data['group_invitations']); + } + if (\array_key_exists('workspace_invitations', $data)) { $values_1 = []; - foreach ($object->getWorkspaceInvitations() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['workspace_invitations'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class, 'json', $context); } - $data['workspace_invitations'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setWorkspaceInvitations($values_1); + unset($data['workspace_invitations']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Dashboard::class => false]; - } + return $object; } -} else { - class DashboardNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Dashboard::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getGroupInvitations() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Dashboard::class === get_class($data); + $dataArray['group_invitations'] = $values; + $values_1 = []; + foreach ($data->getWorkspaceInvitations() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Dashboard(); - if (null === $data || false === \is_array($data)) { - return $object; + $dataArray['workspace_invitations'] = $values_1; + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - if (\array_key_exists('group_invitations', $data)) { - $values = []; - foreach ($data['group_invitations'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class, 'json', $context); - } - $object->setGroupInvitations($values); - unset($data['group_invitations']); - } - if (\array_key_exists('workspace_invitations', $data)) { - $values_1 = []; - foreach ($data['workspace_invitations'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class, 'json', $context); - } - $object->setWorkspaceInvitations($values_1); - unset($data['workspace_invitations']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getGroupInvitations() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['group_invitations'] = $values; - $values_1 = []; - foreach ($object->getWorkspaceInvitations() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['workspace_invitations'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Dashboard::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Dashboard::class => false]; } } diff --git a/generated/Normalizer/DatabaseApplicationGroupNormalizer.php b/generated/Normalizer/DatabaseApplicationGroupNormalizer.php index 7af25dd..02fd7c2 100644 --- a/generated/Normalizer/DatabaseApplicationGroupNormalizer.php +++ b/generated/Normalizer/DatabaseApplicationGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DatabaseApplicationGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DatabaseApplicationGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class DatabaseApplicationGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => false]; } } diff --git a/generated/Normalizer/DatabaseApplicationNormalizer.php b/generated/Normalizer/DatabaseApplicationNormalizer.php index 38393a9..623f0b5 100644 --- a/generated/Normalizer/DatabaseApplicationNormalizer.php +++ b/generated/Normalizer/DatabaseApplicationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,227 +20,112 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DatabaseApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DatabaseApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplication(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class, 'json', $context)); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class, 'json', $context)); - unset($data['workspace']); - } - if (\array_key_exists('tables', $data)) { - $values = []; - foreach ($data['tables'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class, 'json', $context); - } - $object->setTables($values); - unset($data['tables']); - } - if (\array_key_exists('views', $data)) { - $values_1 = []; - foreach ($data['views'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class, 'json', $context); - } - $object->setViews($values_1); - unset($data['views']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplication(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['group'] = $this->normalizer->normalize($object->getGroup(), 'json', $context); - $data['workspace'] = $this->normalizer->normalize($object->getWorkspace(), 'json', $context); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('group', $data)) { + $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class, 'json', $context)); + unset($data['group']); + } + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class, 'json', $context)); + unset($data['workspace']); + } + if (\array_key_exists('tables', $data)) { $values = []; - foreach ($object->getTables() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['tables'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class, 'json', $context); } - $data['tables'] = $values; + $object->setTables($values); + unset($data['tables']); + } + if (\array_key_exists('views', $data)) { $values_1 = []; - foreach ($object->getViews() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['views'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class, 'json', $context); } - $data['views'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setViews($values_1); + unset($data['views']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => false]; - } + return $object; } -} else { - class DatabaseApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $dataArray['group'] = $this->normalizer->normalize($data->getGroup(), 'json', $context); + $dataArray['workspace'] = $this->normalizer->normalize($data->getWorkspace(), 'json', $context); + $values = []; + foreach ($data->getTables() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class === get_class($data); + $dataArray['tables'] = $values; + $values_1 = []; + foreach ($data->getViews() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplication(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class, 'json', $context)); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class, 'json', $context)); - unset($data['workspace']); - } - if (\array_key_exists('tables', $data)) { - $values = []; - foreach ($data['tables'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class, 'json', $context); - } - $object->setTables($values); - unset($data['tables']); + $dataArray['views'] = $values_1; + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - if (\array_key_exists('views', $data)) { - $values_1 = []; - foreach ($data['views'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class, 'json', $context); - } - $object->setViews($values_1); - unset($data['views']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['group'] = $this->normalizer->normalize($object->getGroup(), 'json', $context); - $data['workspace'] = $this->normalizer->normalize($object->getWorkspace(), 'json', $context); - $values = []; - foreach ($object->getTables() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['tables'] = $values; - $values_1 = []; - foreach ($object->getViews() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['views'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => false]; } } diff --git a/generated/Normalizer/DatabaseApplicationWorkspaceNormalizer.php b/generated/Normalizer/DatabaseApplicationWorkspaceNormalizer.php index f73a7e5..010e12e 100644 --- a/generated/Normalizer/DatabaseApplicationWorkspaceNormalizer.php +++ b/generated/Normalizer/DatabaseApplicationWorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DatabaseApplicationWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DatabaseApplicationWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class DatabaseApplicationWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => false]; } } diff --git a/generated/Normalizer/DatabaseBaseApplicationCreatePolymorphicNormalizer.php b/generated/Normalizer/DatabaseBaseApplicationCreatePolymorphicNormalizer.php index 02f926f..2ea5672 100644 --- a/generated/Normalizer/DatabaseBaseApplicationCreatePolymorphicNormalizer.php +++ b/generated/Normalizer/DatabaseBaseApplicationCreatePolymorphicNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,153 +20,78 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DatabaseBaseApplicationCreatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DatabaseBaseApplicationCreatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('init_with_data', $data)) { - $object->setInitWithData($data['init_with_data']); - unset($data['init_with_data']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic(); + if (\array_key_exists('init_with_data', $data) && \is_int($data['init_with_data'])) { + $data['init_with_data'] = (bool) $data['init_with_data']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('initWithData') && null !== $object->getInitWithData()) { - $data['init_with_data'] = $object->getInitWithData(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class DatabaseBaseApplicationCreatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class === $type; + if (\array_key_exists('init_with_data', $data)) { + $object->setInitWithData($data['init_with_data']); + unset($data['init_with_data']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('init_with_data', $data)) { - $object->setInitWithData($data['init_with_data']); - unset($data['init_with_data']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('initWithData') && null !== $data->getInitWithData()) { + $dataArray['init_with_data'] = $data->getInitWithData(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('initWithData') && null !== $object->getInitWithData()) { - $data['init_with_data'] = $object->getInitWithData(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => false]; } } diff --git a/generated/Normalizer/DatabaseBaseApplicationUpdatePolymorphicNormalizer.php b/generated/Normalizer/DatabaseBaseApplicationUpdatePolymorphicNormalizer.php index 1ce0e22..dfc45c5 100644 --- a/generated/Normalizer/DatabaseBaseApplicationUpdatePolymorphicNormalizer.php +++ b/generated/Normalizer/DatabaseBaseApplicationUpdatePolymorphicNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DatabaseBaseApplicationUpdatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DatabaseBaseApplicationUpdatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => false]; - } + return $object; } -} else { - class DatabaseBaseApplicationUpdatePolymorphicNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => false]; } } diff --git a/generated/Normalizer/DateFieldCreateFieldNormalizer.php b/generated/Normalizer/DateFieldCreateFieldNormalizer.php index 477eeb9..ecfd608 100644 --- a/generated/Normalizer/DateFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/DateFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,253 +20,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DateFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DateFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DateFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DateFieldCreateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); + unset($data['date_force_timezone_offset']); + } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => false]; - } + return $object; } -} else { - class DateFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DateFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('dateForceTimezoneOffset') && null !== $data->getDateForceTimezoneOffset()) { + $dataArray['date_force_timezone_offset'] = $data->getDateForceTimezoneOffset(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/DateFieldFieldNormalizer.php b/generated/Normalizer/DateFieldFieldNormalizer.php index 954ab8e..fff98dc 100644 --- a/generated/Normalizer/DateFieldFieldNormalizer.php +++ b/generated/Normalizer/DateFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,277 +20,149 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DateFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DateFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DateFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DateFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DateFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DateFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DateFieldField::class => false]; - } + return $object; } -} else { - class DateFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DateFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DateFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DateFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DateFieldField::class => false]; } } diff --git a/generated/Normalizer/DateFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/DateFieldFieldSerializerWithRelatedFieldsNormalizer.php index b6db7f7..69db5dd 100644 --- a/generated/Normalizer/DateFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/DateFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,297 +20,159 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DateFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DateFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class DateFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class === get_class($data); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/DateFieldUpdateFieldNormalizer.php b/generated/Normalizer/DateFieldUpdateFieldNormalizer.php index 307a382..2f531ea 100644 --- a/generated/Normalizer/DateFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/DateFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,257 +20,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DateFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DateFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); + unset($data['date_force_timezone_offset']); + } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => false]; - } + return $object; } -} else { - class DateFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('dateForceTimezoneOffset') && null !== $data->getDateForceTimezoneOffset()) { + $dataArray['date_force_timezone_offset'] = $data->getDateForceTimezoneOffset(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/DuplicateApplicationJobCreateJobNormalizer.php b/generated/Normalizer/DuplicateApplicationJobCreateJobNormalizer.php index 0b5d10f..fdb2b39 100644 --- a/generated/Normalizer/DuplicateApplicationJobCreateJobNormalizer.php +++ b/generated/Normalizer/DuplicateApplicationJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateApplicationJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateApplicationJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('application_id', $data)) { - $object->setApplicationId($data['application_id']); - unset($data['application_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - $data['application_id'] = $object->getApplicationId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => false]; + if (\array_key_exists('application_id', $data)) { + $object->setApplicationId($data['application_id']); + unset($data['application_id']); } - } -} else { - class DuplicateApplicationJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('application_id', $data)) { - $object->setApplicationId($data['application_id']); - unset($data['application_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + $dataArray['application_id'] = $data->getApplicationId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - $data['application_id'] = $object->getApplicationId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/DuplicateApplicationJobJobNormalizer.php b/generated/Normalizer/DuplicateApplicationJobJobNormalizer.php index 715760f..2ed3ef2 100644 --- a/generated/Normalizer/DuplicateApplicationJobJobNormalizer.php +++ b/generated/Normalizer/DuplicateApplicationJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateApplicationJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateApplicationJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_application', $data)) { - $object->setOriginalApplication($data['original_application']); - unset($data['original_application']); - } - if (\array_key_exists('duplicated_application', $data)) { - $object->setDuplicatedApplication($data['duplicated_application']); - unset($data['duplicated_application']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class DuplicateApplicationJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_application', $data)) { - $object->setOriginalApplication($data['original_application']); - unset($data['original_application']); - } - if (\array_key_exists('duplicated_application', $data)) { - $object->setDuplicatedApplication($data['duplicated_application']); - unset($data['duplicated_application']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('original_application', $data)) { + $object->setOriginalApplication($data['original_application']); + unset($data['original_application']); + } + if (\array_key_exists('duplicated_application', $data)) { + $object->setDuplicatedApplication($data['duplicated_application']); + unset($data['duplicated_application']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => false]; } } diff --git a/generated/Normalizer/DuplicateElementNormalizer.php b/generated/Normalizer/DuplicateElementNormalizer.php index 90532d8..09a5f1d 100644 --- a/generated/Normalizer/DuplicateElementNormalizer.php +++ b/generated/Normalizer/DuplicateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('elements', $data)) { - $values = []; - foreach ($data['elements'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Element::class, 'json', $context); - } - $object->setElements($values); - unset($data['elements']); - } - if (\array_key_exists('workflow_actions', $data)) { - $values_1 = []; - foreach ($data['workflow_actions'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class, 'json', $context); - } - $object->setWorkflowActions($values_1); - unset($data['workflow_actions']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('elements', $data)) { + $values = []; + foreach ($data['elements'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Element::class, 'json', $context); } - - return $data; + $object->setElements($values); + unset($data['elements']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateElement::class => false]; + if (\array_key_exists('workflow_actions', $data)) { + $values_1 = []; + foreach ($data['workflow_actions'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class, 'json', $context); + } + $object->setWorkflowActions($values_1); + unset($data['workflow_actions']); } - } -} else { - class DuplicateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateElement::class === $type; + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateElement::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('elements', $data)) { - $values = []; - foreach ($data['elements'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Element::class, 'json', $context); - } - $object->setElements($values); - unset($data['elements']); - } - if (\array_key_exists('workflow_actions', $data)) { - $values_1 = []; - foreach ($data['workflow_actions'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class, 'json', $context); - } - $object->setWorkflowActions($values_1); - unset($data['workflow_actions']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateElement::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateElement::class => false]; } } diff --git a/generated/Normalizer/DuplicateFieldJobCreateJobNormalizer.php b/generated/Normalizer/DuplicateFieldJobCreateJobNormalizer.php index 21b5c97..a1ee44f 100644 --- a/generated/Normalizer/DuplicateFieldJobCreateJobNormalizer.php +++ b/generated/Normalizer/DuplicateFieldJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,153 +20,78 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateFieldJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateFieldJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('field_id', $data)) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } - if (\array_key_exists('duplicate_data', $data)) { - $object->setDuplicateData($data['duplicate_data']); - unset($data['duplicate_data']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob(); + if (\array_key_exists('duplicate_data', $data) && \is_int($data['duplicate_data'])) { + $data['duplicate_data'] = (bool) $data['duplicate_data']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - $data['field_id'] = $object->getFieldId(); - if ($object->isInitialized('duplicateData') && null !== $object->getDuplicateData()) { - $data['duplicate_data'] = $object->getDuplicateData(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => false]; + if (\array_key_exists('field_id', $data)) { + $object->setFieldId($data['field_id']); + unset($data['field_id']); } - } -} else { - class DuplicateFieldJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class === $type; + if (\array_key_exists('duplicate_data', $data)) { + $object->setDuplicateData($data['duplicate_data']); + unset($data['duplicate_data']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('field_id', $data)) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } - if (\array_key_exists('duplicate_data', $data)) { - $object->setDuplicateData($data['duplicate_data']); - unset($data['duplicate_data']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + $dataArray['field_id'] = $data->getFieldId(); + if ($data->isInitialized('duplicateData') && null !== $data->getDuplicateData()) { + $dataArray['duplicate_data'] = $data->getDuplicateData(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - $data['field_id'] = $object->getFieldId(); - if ($object->isInitialized('duplicateData') && null !== $object->getDuplicateData()) { - $data['duplicate_data'] = $object->getDuplicateData(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/DuplicateFieldJobJobDuplicatedFieldNormalizer.php b/generated/Normalizer/DuplicateFieldJobJobDuplicatedFieldNormalizer.php index 10e0773..7eae054 100644 --- a/generated/Normalizer/DuplicateFieldJobJobDuplicatedFieldNormalizer.php +++ b/generated/Normalizer/DuplicateFieldJobJobDuplicatedFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateFieldJobJobDuplicatedFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateFieldJobJobDuplicatedFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => false]; - } + return $object; } -} else { - class DuplicateFieldJobJobDuplicatedFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => false]; } } diff --git a/generated/Normalizer/DuplicateFieldJobJobNormalizer.php b/generated/Normalizer/DuplicateFieldJobJobNormalizer.php index d019980..50a9147 100644 --- a/generated/Normalizer/DuplicateFieldJobJobNormalizer.php +++ b/generated/Normalizer/DuplicateFieldJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateFieldJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateFieldJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_field', $data)) { - $object->setOriginalField($this->denormalizer->denormalize($data['original_field'], \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class, 'json', $context)); - unset($data['original_field']); - } - if (\array_key_exists('duplicated_field', $data)) { - $object->setDuplicatedField($this->denormalizer->denormalize($data['duplicated_field'], \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class, 'json', $context)); - unset($data['duplicated_field']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class DuplicateFieldJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_field', $data)) { - $object->setOriginalField($this->denormalizer->denormalize($data['original_field'], \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class, 'json', $context)); - unset($data['original_field']); - } - if (\array_key_exists('duplicated_field', $data)) { - $object->setDuplicatedField($this->denormalizer->denormalize($data['duplicated_field'], \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class, 'json', $context)); - unset($data['duplicated_field']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('original_field', $data)) { + $object->setOriginalField($this->denormalizer->denormalize($data['original_field'], \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class, 'json', $context)); + unset($data['original_field']); + } + if (\array_key_exists('duplicated_field', $data)) { + $object->setDuplicatedField($this->denormalizer->denormalize($data['duplicated_field'], \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class, 'json', $context)); + unset($data['duplicated_field']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => false]; } } diff --git a/generated/Normalizer/DuplicateFieldJobJobOriginalFieldNormalizer.php b/generated/Normalizer/DuplicateFieldJobJobOriginalFieldNormalizer.php index f909158..e6444f3 100644 --- a/generated/Normalizer/DuplicateFieldJobJobOriginalFieldNormalizer.php +++ b/generated/Normalizer/DuplicateFieldJobJobOriginalFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateFieldJobJobOriginalFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateFieldJobJobOriginalFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => false]; - } + return $object; } -} else { - class DuplicateFieldJobJobOriginalFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => false]; } } diff --git a/generated/Normalizer/DuplicatePageJobCreateJobNormalizer.php b/generated/Normalizer/DuplicatePageJobCreateJobNormalizer.php index a6d16a3..7632131 100644 --- a/generated/Normalizer/DuplicatePageJobCreateJobNormalizer.php +++ b/generated/Normalizer/DuplicatePageJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicatePageJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicatePageJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - $data['page_id'] = $object->getPageId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => false]; + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); } - } -} else { - class DuplicatePageJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + $dataArray['page_id'] = $data->getPageId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - $data['page_id'] = $object->getPageId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/DuplicatePageJobJobDuplicatedPageNormalizer.php b/generated/Normalizer/DuplicatePageJobJobDuplicatedPageNormalizer.php index f4a0ac9..84d8b1c 100644 --- a/generated/Normalizer/DuplicatePageJobJobDuplicatedPageNormalizer.php +++ b/generated/Normalizer/DuplicatePageJobJobDuplicatedPageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicatePageJobJobDuplicatedPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicatePageJobJobDuplicatedPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; - } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('path', $data)) { + $object->setPath($data['path']); + unset($data['path']); + } + if (\array_key_exists('path_params', $data)) { + $values = []; + foreach ($data['path_params'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); } - - return $data; + $object->setPathParams($values); + unset($data['path_params']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class DuplicatePageJobJobDuplicatedPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class === $type; + if (\array_key_exists('builder_id', $data)) { + $object->setBuilderId($data['builder_id']); + unset($data['builder_id']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class === get_class($data); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['path'] = $data->getPath(); + if ($data->isInitialized('pathParams') && null !== $data->getPathParams()) { + $values = []; + foreach ($data->getPathParams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['path_params'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => false]; } } diff --git a/generated/Normalizer/DuplicatePageJobJobNormalizer.php b/generated/Normalizer/DuplicatePageJobJobNormalizer.php index acda902..cbc4ece 100644 --- a/generated/Normalizer/DuplicatePageJobJobNormalizer.php +++ b/generated/Normalizer/DuplicatePageJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicatePageJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicatePageJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_page', $data)) { - $object->setOriginalPage($this->denormalizer->denormalize($data['original_page'], \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class, 'json', $context)); - unset($data['original_page']); - } - if (\array_key_exists('duplicated_page', $data)) { - $object->setDuplicatedPage($this->denormalizer->denormalize($data['duplicated_page'], \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class, 'json', $context)); - unset($data['duplicated_page']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class DuplicatePageJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_page', $data)) { - $object->setOriginalPage($this->denormalizer->denormalize($data['original_page'], \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class, 'json', $context)); - unset($data['original_page']); - } - if (\array_key_exists('duplicated_page', $data)) { - $object->setDuplicatedPage($this->denormalizer->denormalize($data['duplicated_page'], \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class, 'json', $context)); - unset($data['duplicated_page']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('original_page', $data)) { + $object->setOriginalPage($this->denormalizer->denormalize($data['original_page'], \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class, 'json', $context)); + unset($data['original_page']); + } + if (\array_key_exists('duplicated_page', $data)) { + $object->setDuplicatedPage($this->denormalizer->denormalize($data['duplicated_page'], \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class, 'json', $context)); + unset($data['duplicated_page']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => false]; } } diff --git a/generated/Normalizer/DuplicatePageJobJobOriginalPageNormalizer.php b/generated/Normalizer/DuplicatePageJobJobOriginalPageNormalizer.php index 79eadb1..18eeb3b 100644 --- a/generated/Normalizer/DuplicatePageJobJobOriginalPageNormalizer.php +++ b/generated/Normalizer/DuplicatePageJobJobOriginalPageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicatePageJobJobOriginalPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicatePageJobJobOriginalPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; - } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('path', $data)) { + $object->setPath($data['path']); + unset($data['path']); + } + if (\array_key_exists('path_params', $data)) { + $values = []; + foreach ($data['path_params'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); } - - return $data; + $object->setPathParams($values); + unset($data['path_params']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class DuplicatePageJobJobOriginalPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class === $type; + if (\array_key_exists('builder_id', $data)) { + $object->setBuilderId($data['builder_id']); + unset($data['builder_id']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class === get_class($data); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['path'] = $data->getPath(); + if ($data->isInitialized('pathParams') && null !== $data->getPathParams()) { + $values = []; + foreach ($data->getPathParams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['path_params'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => false]; } } diff --git a/generated/Normalizer/DuplicateTableJobCreateJobNormalizer.php b/generated/Normalizer/DuplicateTableJobCreateJobNormalizer.php index 33ee85c..c03d880 100644 --- a/generated/Normalizer/DuplicateTableJobCreateJobNormalizer.php +++ b/generated/Normalizer/DuplicateTableJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateTableJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateTableJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - $data['table_id'] = $object->getTableId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => false]; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - } -} else { - class DuplicateTableJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + $dataArray['table_id'] = $data->getTableId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - $data['table_id'] = $object->getTableId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/DuplicateTableJobJobDuplicatedTableNormalizer.php b/generated/Normalizer/DuplicateTableJobJobDuplicatedTableNormalizer.php index 78a14f8..116f0cb 100644 --- a/generated/Normalizer/DuplicateTableJobJobDuplicatedTableNormalizer.php +++ b/generated/Normalizer/DuplicateTableJobJobDuplicatedTableNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateTableJobJobDuplicatedTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateTableJobJobDuplicatedTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class DuplicateTableJobJobDuplicatedTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class === $type; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class === get_class($data); + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => false]; } } diff --git a/generated/Normalizer/DuplicateTableJobJobNormalizer.php b/generated/Normalizer/DuplicateTableJobJobNormalizer.php index 4ad833e..1b56f3f 100644 --- a/generated/Normalizer/DuplicateTableJobJobNormalizer.php +++ b/generated/Normalizer/DuplicateTableJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateTableJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateTableJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_table', $data)) { - $object->setOriginalTable($this->denormalizer->denormalize($data['original_table'], \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class, 'json', $context)); - unset($data['original_table']); - } - if (\array_key_exists('duplicated_table', $data)) { - $object->setDuplicatedTable($this->denormalizer->denormalize($data['duplicated_table'], \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class, 'json', $context)); - unset($data['duplicated_table']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class DuplicateTableJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_table', $data)) { - $object->setOriginalTable($this->denormalizer->denormalize($data['original_table'], \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class, 'json', $context)); - unset($data['original_table']); - } - if (\array_key_exists('duplicated_table', $data)) { - $object->setDuplicatedTable($this->denormalizer->denormalize($data['duplicated_table'], \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class, 'json', $context)); - unset($data['duplicated_table']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('original_table', $data)) { + $object->setOriginalTable($this->denormalizer->denormalize($data['original_table'], \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class, 'json', $context)); + unset($data['original_table']); + } + if (\array_key_exists('duplicated_table', $data)) { + $object->setDuplicatedTable($this->denormalizer->denormalize($data['duplicated_table'], \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class, 'json', $context)); + unset($data['duplicated_table']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => false]; } } diff --git a/generated/Normalizer/DuplicateTableJobJobOriginalTableNormalizer.php b/generated/Normalizer/DuplicateTableJobJobOriginalTableNormalizer.php index 86263b1..c0af96e 100644 --- a/generated/Normalizer/DuplicateTableJobJobOriginalTableNormalizer.php +++ b/generated/Normalizer/DuplicateTableJobJobOriginalTableNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DuplicateTableJobJobOriginalTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DuplicateTableJobJobOriginalTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class DuplicateTableJobJobOriginalTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class === $type; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class === get_class($data); + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => false]; } } diff --git a/generated/Normalizer/DurationFieldCreateFieldNormalizer.php b/generated/Normalizer/DurationFieldCreateFieldNormalizer.php index 900e2fb..96f3b46 100644 --- a/generated/Normalizer/DurationFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/DurationFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DurationFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DurationFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('duration_format', $data)) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('duration_format', $data)) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => false]; - } + return $object; } -} else { - class DurationFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class === get_class($data); + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('duration_format', $data)) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/DurationFieldFieldNormalizer.php b/generated/Normalizer/DurationFieldFieldNormalizer.php index 273db0c..fac6916 100644 --- a/generated/Normalizer/DurationFieldFieldNormalizer.php +++ b/generated/Normalizer/DurationFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,217 +20,113 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DurationFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DurationFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DurationFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DurationFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('duration_format', $data)) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('duration_format', $data)) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DurationFieldField::class => false]; - } + return $object; } -} else { - class DurationFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DurationFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('duration_format', $data)) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DurationFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DurationFieldField::class => false]; } } diff --git a/generated/Normalizer/DurationFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/DurationFieldFieldSerializerWithRelatedFieldsNormalizer.php index 9ef2256..f8db023 100644 --- a/generated/Normalizer/DurationFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/DurationFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,233 +20,121 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DurationFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DurationFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('duration_format', $data)) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('duration_format', $data)) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class DurationFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('duration_format', $data)) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/DurationFieldUpdateFieldNormalizer.php b/generated/Normalizer/DurationFieldUpdateFieldNormalizer.php index 59f9ce3..dacb7c8 100644 --- a/generated/Normalizer/DurationFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/DurationFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,179 +20,88 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class DurationFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class DurationFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('duration_format', $data)) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('duration_format', $data)) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => false]; - } + return $object; } -} else { - class DurationFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('duration_format', $data)) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/ElementNormalizer.php b/generated/Normalizer/ElementNormalizer.php index 6b2b15a..dac859f 100644 --- a/generated/Normalizer/ElementNormalizer.php +++ b/generated/Normalizer/ElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,567 +20,282 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Element::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Element::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Element::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Element::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Element(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Element(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Element::class => false]; - } + return $object; } -} else { - class ElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Element::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Element::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Element(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Element::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Element::class => false]; } } diff --git a/generated/Normalizer/ElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ElementStyleBackgroundFileNormalizer.php index 3461874..047b7d4 100644 --- a/generated/Normalizer/ElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/EmailFieldCreateFieldNormalizer.php b/generated/Normalizer/EmailFieldCreateFieldNormalizer.php index a943fc9..db718c3 100644 --- a/generated/Normalizer/EmailFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/EmailFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EmailFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class EmailFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class EmailFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/EmailFieldFieldNormalizer.php b/generated/Normalizer/EmailFieldFieldNormalizer.php index 2c30869..6e13b4a 100644 --- a/generated/Normalizer/EmailFieldFieldNormalizer.php +++ b/generated/Normalizer/EmailFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EmailFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class EmailFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\EmailFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailFieldField::class => false]; - } + return $object; } -} else { - class EmailFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\EmailFieldField::class => false]; } } diff --git a/generated/Normalizer/EmailFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/EmailFieldFieldSerializerWithRelatedFieldsNormalizer.php index 600ad12..eea34a6 100644 --- a/generated/Normalizer/EmailFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/EmailFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EmailFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class EmailFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class EmailFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/EmailFieldUpdateFieldNormalizer.php b/generated/Normalizer/EmailFieldUpdateFieldNormalizer.php index a88ad72..425255c 100644 --- a/generated/Normalizer/EmailFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/EmailFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EmailFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class EmailFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => false]; - } + return $object; } -} else { - class EmailFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/EmailTesterRequestNormalizer.php b/generated/Normalizer/EmailTesterRequestNormalizer.php index 75c6c8d..9fd31f5 100644 --- a/generated/Normalizer/EmailTesterRequestNormalizer.php +++ b/generated/Normalizer/EmailTesterRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EmailTesterRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class EmailTesterRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailTesterRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('target_email', $data)) { - $object->setTargetEmail($data['target_email']); - unset($data['target_email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\EmailTesterRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['target_email'] = $object->getTargetEmail(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('target_email', $data)) { + $object->setTargetEmail($data['target_email']); + unset($data['target_email']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => false]; - } + return $object; } -} else { - class EmailTesterRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailTesterRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('target_email', $data)) { - $object->setTargetEmail($data['target_email']); - unset($data['target_email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['target_email'] = $data->getTargetEmail(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['target_email'] = $object->getTargetEmail(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => false]; } } diff --git a/generated/Normalizer/EmailTesterResponseNormalizer.php b/generated/Normalizer/EmailTesterResponseNormalizer.php index 704c889..2da7ae6 100644 --- a/generated/Normalizer/EmailTesterResponseNormalizer.php +++ b/generated/Normalizer/EmailTesterResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EmailTesterResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class EmailTesterResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailTesterResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('succeeded', $data)) { - $object->setSucceeded($data['succeeded']); - unset($data['succeeded']); - } - if (\array_key_exists('error_stack', $data) && null !== $data['error_stack']) { - $object->setErrorStack($data['error_stack']); - unset($data['error_stack']); - } elseif (\array_key_exists('error_stack', $data) && null === $data['error_stack']) { - $object->setErrorStack(null); - } - if (\array_key_exists('error_type', $data) && null !== $data['error_type']) { - $object->setErrorType($data['error_type']); - unset($data['error_type']); - } elseif (\array_key_exists('error_type', $data) && null === $data['error_type']) { - $object->setErrorType(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\EmailTesterResponse(); + if (\array_key_exists('succeeded', $data) && \is_int($data['succeeded'])) { + $data['succeeded'] = (bool) $data['succeeded']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['succeeded'] = $object->getSucceeded(); - if ($object->isInitialized('errorStack') && null !== $object->getErrorStack()) { - $data['error_stack'] = $object->getErrorStack(); - } - if ($object->isInitialized('errorType') && null !== $object->getErrorType()) { - $data['error_type'] = $object->getErrorType(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('succeeded', $data)) { + $object->setSucceeded($data['succeeded']); + unset($data['succeeded']); + } + if (\array_key_exists('error_stack', $data) && null !== $data['error_stack']) { + $object->setErrorStack($data['error_stack']); + unset($data['error_stack']); + } elseif (\array_key_exists('error_stack', $data) && null === $data['error_stack']) { + $object->setErrorStack(null); + } + if (\array_key_exists('error_type', $data) && null !== $data['error_type']) { + $object->setErrorType($data['error_type']); + unset($data['error_type']); + } elseif (\array_key_exists('error_type', $data) && null === $data['error_type']) { + $object->setErrorType(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => false]; - } + return $object; } -} else { - class EmailTesterResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['succeeded'] = $data->getSucceeded(); + if ($data->isInitialized('errorStack') && null !== $data->getErrorStack()) { + $dataArray['error_stack'] = $data->getErrorStack(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class === get_class($data); + if ($data->isInitialized('errorType') && null !== $data->getErrorType()) { + $dataArray['error_type'] = $data->getErrorType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\EmailTesterResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('succeeded', $data)) { - $object->setSucceeded($data['succeeded']); - unset($data['succeeded']); - } - if (\array_key_exists('error_stack', $data) && null !== $data['error_stack']) { - $object->setErrorStack($data['error_stack']); - unset($data['error_stack']); - } elseif (\array_key_exists('error_stack', $data) && null === $data['error_stack']) { - $object->setErrorStack(null); - } - if (\array_key_exists('error_type', $data) && null !== $data['error_type']) { - $object->setErrorType($data['error_type']); - unset($data['error_type']); - } elseif (\array_key_exists('error_type', $data) && null === $data['error_type']) { - $object->setErrorType(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['succeeded'] = $object->getSucceeded(); - if ($object->isInitialized('errorStack') && null !== $object->getErrorStack()) { - $data['error_stack'] = $object->getErrorStack(); - } - if ($object->isInitialized('errorType') && null !== $object->getErrorType()) { - $data['error_type'] = $object->getErrorType(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => false]; } } diff --git a/generated/Normalizer/ExampleBatchRowsResponseNormalizer.php b/generated/Normalizer/ExampleBatchRowsResponseNormalizer.php index 8dc5909..3c1913d 100644 --- a/generated/Normalizer/ExampleBatchRowsResponseNormalizer.php +++ b/generated/Normalizer/ExampleBatchRowsResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ExampleBatchRowsResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ExampleBatchRowsResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowResponse::class, 'json', $context); - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('items', $data)) { $values = []; - foreach ($object->getItems() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['items'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowResponse::class, 'json', $context); } - $data['items'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setItems($values); + unset($data['items']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => false]; - } + return $object; } -} else { - class ExampleBatchRowsResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getItems() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['items'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowResponse::class, 'json', $context); - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getItems() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['items'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => false]; } } diff --git a/generated/Normalizer/ExampleRowRequestNormalizer.php b/generated/Normalizer/ExampleRowRequestNormalizer.php index da28901..2ca28bd 100644 --- a/generated/Normalizer/ExampleRowRequestNormalizer.php +++ b/generated/Normalizer/ExampleRowRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,475 +20,239 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ExampleRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ExampleRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowRequest(); - if (\array_key_exists('field_13', $data) && \is_int($data['field_13'])) { - $data['field_13'] = (float) $data['field_13']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_1', $data) && null !== $data['field_1']) { - $object->setField1($data['field_1']); - unset($data['field_1']); - } elseif (\array_key_exists('field_1', $data) && null === $data['field_1']) { - $object->setField1(null); - } - if (\array_key_exists('field_2', $data) && null !== $data['field_2']) { - $object->setField2($data['field_2']); - unset($data['field_2']); - } elseif (\array_key_exists('field_2', $data) && null === $data['field_2']) { - $object->setField2(null); - } - if (\array_key_exists('field_3', $data) && null !== $data['field_3']) { - $object->setField3($data['field_3']); - unset($data['field_3']); - } elseif (\array_key_exists('field_3', $data) && null === $data['field_3']) { - $object->setField3(null); - } - if (\array_key_exists('field_4', $data) && null !== $data['field_4']) { - $object->setField4($data['field_4']); - unset($data['field_4']); - } elseif (\array_key_exists('field_4', $data) && null === $data['field_4']) { - $object->setField4(null); - } - if (\array_key_exists('field_5', $data) && null !== $data['field_5']) { - $object->setField5($data['field_5']); - unset($data['field_5']); - } elseif (\array_key_exists('field_5', $data) && null === $data['field_5']) { - $object->setField5(null); - } - if (\array_key_exists('field_6', $data)) { - $object->setField6($data['field_6']); - unset($data['field_6']); - } - if (\array_key_exists('field_7', $data)) { - $object->setField7($data['field_7']); - unset($data['field_7']); - } - if (\array_key_exists('field_8', $data) && null !== $data['field_8']) { - $object->setField8(\DateTime::createFromFormat('Y-m-d', $data['field_8'])->setTime(0, 0, 0)); - unset($data['field_8']); - } elseif (\array_key_exists('field_8', $data) && null === $data['field_8']) { - $object->setField8(null); - } - if (\array_key_exists('field_13', $data) && null !== $data['field_13']) { - $object->setField13($data['field_13']); - unset($data['field_13']); - } elseif (\array_key_exists('field_13', $data) && null === $data['field_13']) { - $object->setField13(null); - } - if (\array_key_exists('field_14', $data)) { - $values = []; - foreach ($data['field_14'] as $value) { - $values[] = $value; - } - $object->setField14($values); - unset($data['field_14']); - } - if (\array_key_exists('field_15', $data) && null !== $data['field_15']) { - $values_1 = []; - foreach ($data['field_15'] as $value_1) { - $values_1[] = $value_1; - } - $object->setField15($values_1); - unset($data['field_15']); - } elseif (\array_key_exists('field_15', $data) && null === $data['field_15']) { - $object->setField15(null); - } - if (\array_key_exists('field_16', $data) && null !== $data['field_16']) { - $object->setField16($data['field_16']); - unset($data['field_16']); - } elseif (\array_key_exists('field_16', $data) && null === $data['field_16']) { - $object->setField16(null); - } - if (\array_key_exists('field_17', $data)) { - $values_2 = []; - foreach ($data['field_17'] as $value_2) { - $values_2[] = $value_2; - } - $object->setField17($values_2); - unset($data['field_17']); - } - if (\array_key_exists('field_18', $data) && null !== $data['field_18']) { - $object->setField18($data['field_18']); - unset($data['field_18']); - } elseif (\array_key_exists('field_18', $data) && null === $data['field_18']) { - $object->setField18(null); - } - if (\array_key_exists('field_23', $data)) { - $values_3 = []; - foreach ($data['field_23'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\Collaborator::class, 'json', $context); - } - $object->setField23($values_3); - unset($data['field_23']); - } - if (\array_key_exists('field_26', $data) && null !== $data['field_26']) { - $object->setField26($data['field_26']); - unset($data['field_26']); - } elseif (\array_key_exists('field_26', $data) && null === $data['field_26']) { - $object->setField26(null); - } - if (\array_key_exists('field_27', $data) && null !== $data['field_27']) { - $object->setField27($data['field_27']); - unset($data['field_27']); - } elseif (\array_key_exists('field_27', $data) && null === $data['field_27']) { - $object->setField27(null); - } - foreach ($data as $key => $value_4) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_4; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowRequest(); + if (\array_key_exists('field_13', $data) && \is_int($data['field_13'])) { + $data['field_13'] = (float) $data['field_13']; + } + if (\array_key_exists('field_7', $data) && \is_int($data['field_7'])) { + $data['field_7'] = (bool) $data['field_7']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('field1') && null !== $object->getField1()) { - $data['field_1'] = $object->getField1(); - } - if ($object->isInitialized('field2') && null !== $object->getField2()) { - $data['field_2'] = $object->getField2(); - } - if ($object->isInitialized('field3') && null !== $object->getField3()) { - $data['field_3'] = $object->getField3(); - } - if ($object->isInitialized('field4') && null !== $object->getField4()) { - $data['field_4'] = $object->getField4(); - } - if ($object->isInitialized('field5') && null !== $object->getField5()) { - $data['field_5'] = $object->getField5(); - } - if ($object->isInitialized('field6') && null !== $object->getField6()) { - $data['field_6'] = $object->getField6(); - } - if ($object->isInitialized('field7') && null !== $object->getField7()) { - $data['field_7'] = $object->getField7(); - } - if ($object->isInitialized('field8') && null !== $object->getField8()) { - $data['field_8'] = $object->getField8()->format('Y-m-d'); - } - if ($object->isInitialized('field13') && null !== $object->getField13()) { - $data['field_13'] = $object->getField13(); - } - if ($object->isInitialized('field14') && null !== $object->getField14()) { - $values = []; - foreach ($object->getField14() as $value) { - $values[] = $value; - } - $data['field_14'] = $values; - } - if ($object->isInitialized('field15') && null !== $object->getField15()) { - $values_1 = []; - foreach ($object->getField15() as $value_1) { - $values_1[] = $value_1; - } - $data['field_15'] = $values_1; - } - if ($object->isInitialized('field16') && null !== $object->getField16()) { - $data['field_16'] = $object->getField16(); - } - if ($object->isInitialized('field17') && null !== $object->getField17()) { - $values_2 = []; - foreach ($object->getField17() as $value_2) { - $values_2[] = $value_2; - } - $data['field_17'] = $values_2; - } - if ($object->isInitialized('field18') && null !== $object->getField18()) { - $data['field_18'] = $object->getField18(); - } - if ($object->isInitialized('field23') && null !== $object->getField23()) { - $values_3 = []; - foreach ($object->getField23() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['field_23'] = $values_3; + if (\array_key_exists('field_1', $data) && null !== $data['field_1']) { + $object->setField1($data['field_1']); + unset($data['field_1']); + } elseif (\array_key_exists('field_1', $data) && null === $data['field_1']) { + $object->setField1(null); + } + if (\array_key_exists('field_2', $data) && null !== $data['field_2']) { + $object->setField2($data['field_2']); + unset($data['field_2']); + } elseif (\array_key_exists('field_2', $data) && null === $data['field_2']) { + $object->setField2(null); + } + if (\array_key_exists('field_3', $data) && null !== $data['field_3']) { + $object->setField3($data['field_3']); + unset($data['field_3']); + } elseif (\array_key_exists('field_3', $data) && null === $data['field_3']) { + $object->setField3(null); + } + if (\array_key_exists('field_4', $data) && null !== $data['field_4']) { + $object->setField4($data['field_4']); + unset($data['field_4']); + } elseif (\array_key_exists('field_4', $data) && null === $data['field_4']) { + $object->setField4(null); + } + if (\array_key_exists('field_5', $data) && null !== $data['field_5']) { + $object->setField5($data['field_5']); + unset($data['field_5']); + } elseif (\array_key_exists('field_5', $data) && null === $data['field_5']) { + $object->setField5(null); + } + if (\array_key_exists('field_6', $data)) { + $object->setField6($data['field_6']); + unset($data['field_6']); + } + if (\array_key_exists('field_7', $data)) { + $object->setField7($data['field_7']); + unset($data['field_7']); + } + if (\array_key_exists('field_8', $data) && null !== $data['field_8']) { + $object->setField8(\DateTime::createFromFormat('Y-m-d', $data['field_8'])->setTime(0, 0, 0)); + unset($data['field_8']); + } elseif (\array_key_exists('field_8', $data) && null === $data['field_8']) { + $object->setField8(null); + } + if (\array_key_exists('field_13', $data) && null !== $data['field_13']) { + $object->setField13($data['field_13']); + unset($data['field_13']); + } elseif (\array_key_exists('field_13', $data) && null === $data['field_13']) { + $object->setField13(null); + } + if (\array_key_exists('field_14', $data)) { + $values = []; + foreach ($data['field_14'] as $value) { + $values[] = $value; } - if ($object->isInitialized('field26') && null !== $object->getField26()) { - $data['field_26'] = $object->getField26(); + $object->setField14($values); + unset($data['field_14']); + } + if (\array_key_exists('field_15', $data) && null !== $data['field_15']) { + $values_1 = []; + foreach ($data['field_15'] as $value_1) { + $values_1[] = $value_1; + } + $object->setField15($values_1); + unset($data['field_15']); + } elseif (\array_key_exists('field_15', $data) && null === $data['field_15']) { + $object->setField15(null); + } + if (\array_key_exists('field_16', $data) && null !== $data['field_16']) { + $object->setField16($data['field_16']); + unset($data['field_16']); + } elseif (\array_key_exists('field_16', $data) && null === $data['field_16']) { + $object->setField16(null); + } + if (\array_key_exists('field_17', $data)) { + $values_2 = []; + foreach ($data['field_17'] as $value_2) { + $values_2[] = $value_2; } - if ($object->isInitialized('field27') && null !== $object->getField27()) { - $data['field_27'] = $object->getField27(); + $object->setField17($values_2); + unset($data['field_17']); + } + if (\array_key_exists('field_18', $data) && null !== $data['field_18']) { + $object->setField18($data['field_18']); + unset($data['field_18']); + } elseif (\array_key_exists('field_18', $data) && null === $data['field_18']) { + $object->setField18(null); + } + if (\array_key_exists('field_23', $data)) { + $values_3 = []; + foreach ($data['field_23'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\Collaborator::class, 'json', $context); } - foreach ($object as $key => $value_4) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_4; - } + $object->setField23($values_3); + unset($data['field_23']); + } + if (\array_key_exists('field_26', $data) && null !== $data['field_26']) { + $object->setField26($data['field_26']); + unset($data['field_26']); + } elseif (\array_key_exists('field_26', $data) && null === $data['field_26']) { + $object->setField26(null); + } + if (\array_key_exists('field_27', $data) && null !== $data['field_27']) { + $object->setField27($data['field_27']); + unset($data['field_27']); + } elseif (\array_key_exists('field_27', $data) && null === $data['field_27']) { + $object->setField27(null); + } + foreach ($data as $key => $value_4) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_4; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => false]; - } + return $object; } -} else { - class ExampleRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('field1') && null !== $data->getField1()) { + $dataArray['field_1'] = $data->getField1(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class === get_class($data); + if ($data->isInitialized('field2') && null !== $data->getField2()) { + $dataArray['field_2'] = $data->getField2(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowRequest(); - if (\array_key_exists('field_13', $data) && \is_int($data['field_13'])) { - $data['field_13'] = (float) $data['field_13']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_1', $data) && null !== $data['field_1']) { - $object->setField1($data['field_1']); - unset($data['field_1']); - } elseif (\array_key_exists('field_1', $data) && null === $data['field_1']) { - $object->setField1(null); - } - if (\array_key_exists('field_2', $data) && null !== $data['field_2']) { - $object->setField2($data['field_2']); - unset($data['field_2']); - } elseif (\array_key_exists('field_2', $data) && null === $data['field_2']) { - $object->setField2(null); - } - if (\array_key_exists('field_3', $data) && null !== $data['field_3']) { - $object->setField3($data['field_3']); - unset($data['field_3']); - } elseif (\array_key_exists('field_3', $data) && null === $data['field_3']) { - $object->setField3(null); - } - if (\array_key_exists('field_4', $data) && null !== $data['field_4']) { - $object->setField4($data['field_4']); - unset($data['field_4']); - } elseif (\array_key_exists('field_4', $data) && null === $data['field_4']) { - $object->setField4(null); - } - if (\array_key_exists('field_5', $data) && null !== $data['field_5']) { - $object->setField5($data['field_5']); - unset($data['field_5']); - } elseif (\array_key_exists('field_5', $data) && null === $data['field_5']) { - $object->setField5(null); - } - if (\array_key_exists('field_6', $data)) { - $object->setField6($data['field_6']); - unset($data['field_6']); - } - if (\array_key_exists('field_7', $data)) { - $object->setField7($data['field_7']); - unset($data['field_7']); - } - if (\array_key_exists('field_8', $data) && null !== $data['field_8']) { - $object->setField8(\DateTime::createFromFormat('Y-m-d', $data['field_8'])->setTime(0, 0, 0)); - unset($data['field_8']); - } elseif (\array_key_exists('field_8', $data) && null === $data['field_8']) { - $object->setField8(null); - } - if (\array_key_exists('field_13', $data) && null !== $data['field_13']) { - $object->setField13($data['field_13']); - unset($data['field_13']); - } elseif (\array_key_exists('field_13', $data) && null === $data['field_13']) { - $object->setField13(null); - } - if (\array_key_exists('field_14', $data)) { - $values = []; - foreach ($data['field_14'] as $value) { - $values[] = $value; - } - $object->setField14($values); - unset($data['field_14']); - } - if (\array_key_exists('field_15', $data) && null !== $data['field_15']) { - $values_1 = []; - foreach ($data['field_15'] as $value_1) { - $values_1[] = $value_1; - } - $object->setField15($values_1); - unset($data['field_15']); - } elseif (\array_key_exists('field_15', $data) && null === $data['field_15']) { - $object->setField15(null); - } - if (\array_key_exists('field_16', $data) && null !== $data['field_16']) { - $object->setField16($data['field_16']); - unset($data['field_16']); - } elseif (\array_key_exists('field_16', $data) && null === $data['field_16']) { - $object->setField16(null); - } - if (\array_key_exists('field_17', $data)) { - $values_2 = []; - foreach ($data['field_17'] as $value_2) { - $values_2[] = $value_2; - } - $object->setField17($values_2); - unset($data['field_17']); - } - if (\array_key_exists('field_18', $data) && null !== $data['field_18']) { - $object->setField18($data['field_18']); - unset($data['field_18']); - } elseif (\array_key_exists('field_18', $data) && null === $data['field_18']) { - $object->setField18(null); - } - if (\array_key_exists('field_23', $data)) { - $values_3 = []; - foreach ($data['field_23'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\Collaborator::class, 'json', $context); - } - $object->setField23($values_3); - unset($data['field_23']); - } - if (\array_key_exists('field_26', $data) && null !== $data['field_26']) { - $object->setField26($data['field_26']); - unset($data['field_26']); - } elseif (\array_key_exists('field_26', $data) && null === $data['field_26']) { - $object->setField26(null); - } - if (\array_key_exists('field_27', $data) && null !== $data['field_27']) { - $object->setField27($data['field_27']); - unset($data['field_27']); - } elseif (\array_key_exists('field_27', $data) && null === $data['field_27']) { - $object->setField27(null); - } - foreach ($data as $key => $value_4) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_4; - } - } - - return $object; + if ($data->isInitialized('field3') && null !== $data->getField3()) { + $dataArray['field_3'] = $data->getField3(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('field1') && null !== $object->getField1()) { - $data['field_1'] = $object->getField1(); - } - if ($object->isInitialized('field2') && null !== $object->getField2()) { - $data['field_2'] = $object->getField2(); - } - if ($object->isInitialized('field3') && null !== $object->getField3()) { - $data['field_3'] = $object->getField3(); - } - if ($object->isInitialized('field4') && null !== $object->getField4()) { - $data['field_4'] = $object->getField4(); - } - if ($object->isInitialized('field5') && null !== $object->getField5()) { - $data['field_5'] = $object->getField5(); - } - if ($object->isInitialized('field6') && null !== $object->getField6()) { - $data['field_6'] = $object->getField6(); - } - if ($object->isInitialized('field7') && null !== $object->getField7()) { - $data['field_7'] = $object->getField7(); - } - if ($object->isInitialized('field8') && null !== $object->getField8()) { - $data['field_8'] = $object->getField8()->format('Y-m-d'); - } - if ($object->isInitialized('field13') && null !== $object->getField13()) { - $data['field_13'] = $object->getField13(); - } - if ($object->isInitialized('field14') && null !== $object->getField14()) { - $values = []; - foreach ($object->getField14() as $value) { - $values[] = $value; - } - $data['field_14'] = $values; - } - if ($object->isInitialized('field15') && null !== $object->getField15()) { - $values_1 = []; - foreach ($object->getField15() as $value_1) { - $values_1[] = $value_1; - } - $data['field_15'] = $values_1; - } - if ($object->isInitialized('field16') && null !== $object->getField16()) { - $data['field_16'] = $object->getField16(); - } - if ($object->isInitialized('field17') && null !== $object->getField17()) { - $values_2 = []; - foreach ($object->getField17() as $value_2) { - $values_2[] = $value_2; - } - $data['field_17'] = $values_2; - } - if ($object->isInitialized('field18') && null !== $object->getField18()) { - $data['field_18'] = $object->getField18(); + if ($data->isInitialized('field4') && null !== $data->getField4()) { + $dataArray['field_4'] = $data->getField4(); + } + if ($data->isInitialized('field5') && null !== $data->getField5()) { + $dataArray['field_5'] = $data->getField5(); + } + if ($data->isInitialized('field6') && null !== $data->getField6()) { + $dataArray['field_6'] = $data->getField6(); + } + if ($data->isInitialized('field7') && null !== $data->getField7()) { + $dataArray['field_7'] = $data->getField7(); + } + if ($data->isInitialized('field8') && null !== $data->getField8()) { + $dataArray['field_8'] = $data->getField8()->format('Y-m-d'); + } + if ($data->isInitialized('field13') && null !== $data->getField13()) { + $dataArray['field_13'] = $data->getField13(); + } + if ($data->isInitialized('field14') && null !== $data->getField14()) { + $values = []; + foreach ($data->getField14() as $value) { + $values[] = $value; } - if ($object->isInitialized('field23') && null !== $object->getField23()) { - $values_3 = []; - foreach ($object->getField23() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['field_23'] = $values_3; + $dataArray['field_14'] = $values; + } + if ($data->isInitialized('field15') && null !== $data->getField15()) { + $values_1 = []; + foreach ($data->getField15() as $value_1) { + $values_1[] = $value_1; } - if ($object->isInitialized('field26') && null !== $object->getField26()) { - $data['field_26'] = $object->getField26(); + $dataArray['field_15'] = $values_1; + } + if ($data->isInitialized('field16') && null !== $data->getField16()) { + $dataArray['field_16'] = $data->getField16(); + } + if ($data->isInitialized('field17') && null !== $data->getField17()) { + $values_2 = []; + foreach ($data->getField17() as $value_2) { + $values_2[] = $value_2; } - if ($object->isInitialized('field27') && null !== $object->getField27()) { - $data['field_27'] = $object->getField27(); + $dataArray['field_17'] = $values_2; + } + if ($data->isInitialized('field18') && null !== $data->getField18()) { + $dataArray['field_18'] = $data->getField18(); + } + if ($data->isInitialized('field23') && null !== $data->getField23()) { + $values_3 = []; + foreach ($data->getField23() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - foreach ($object as $key => $value_4) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_4; - } + $dataArray['field_23'] = $values_3; + } + if ($data->isInitialized('field26') && null !== $data->getField26()) { + $dataArray['field_26'] = $data->getField26(); + } + if ($data->isInitialized('field27') && null !== $data->getField27()) { + $dataArray['field_27'] = $data->getField27(); + } + foreach ($data as $key => $value_4) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_4; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => false]; } } diff --git a/generated/Normalizer/ExampleRowResponseField10Normalizer.php b/generated/Normalizer/ExampleRowResponseField10Normalizer.php index d7179f7..0a14c45 100644 --- a/generated/Normalizer/ExampleRowResponseField10Normalizer.php +++ b/generated/Normalizer/ExampleRowResponseField10Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ExampleRowResponseField10Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ExampleRowResponseField10Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class ExampleRowResponseField10Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => false]; } } diff --git a/generated/Normalizer/ExampleRowResponseField12Normalizer.php b/generated/Normalizer/ExampleRowResponseField12Normalizer.php index 2bfcf3a..206e234 100644 --- a/generated/Normalizer/ExampleRowResponseField12Normalizer.php +++ b/generated/Normalizer/ExampleRowResponseField12Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ExampleRowResponseField12Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ExampleRowResponseField12Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class ExampleRowResponseField12Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => false]; } } diff --git a/generated/Normalizer/ExampleRowResponseField16Normalizer.php b/generated/Normalizer/ExampleRowResponseField16Normalizer.php index b73c85b..738ebef 100644 --- a/generated/Normalizer/ExampleRowResponseField16Normalizer.php +++ b/generated/Normalizer/ExampleRowResponseField16Normalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,153 +20,75 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ExampleRowResponseField16Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ExampleRowResponseField16Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['id'] = $object->getId(); - } - $data['value'] = $object->getValue(); - $data['color'] = $object->getColor(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => false]; + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); } - } -} else { - class ExampleRowResponseField16Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class === $type; + if (\array_key_exists('color', $data)) { + $object->setColor($data['color']); + unset($data['color']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('id') && null !== $data->getId()) { + $dataArray['id'] = $data->getId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['id'] = $object->getId(); - } - $data['value'] = $object->getValue(); - $data['color'] = $object->getColor(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $dataArray['value'] = $data->getValue(); + $dataArray['color'] = $data->getColor(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => false]; } } diff --git a/generated/Normalizer/ExampleRowResponseNormalizer.php b/generated/Normalizer/ExampleRowResponseNormalizer.php index 0d3e6e1..6bed30d 100644 --- a/generated/Normalizer/ExampleRowResponseNormalizer.php +++ b/generated/Normalizer/ExampleRowResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,651 +20,330 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponse(); - if (\array_key_exists('field_13', $data) && \is_int($data['field_13'])) { - $data['field_13'] = (float) $data['field_13']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('field_1', $data) && null !== $data['field_1']) { - $object->setField1($data['field_1']); - unset($data['field_1']); - } elseif (\array_key_exists('field_1', $data) && null === $data['field_1']) { - $object->setField1(null); - } - if (\array_key_exists('field_2', $data) && null !== $data['field_2']) { - $object->setField2($data['field_2']); - unset($data['field_2']); - } elseif (\array_key_exists('field_2', $data) && null === $data['field_2']) { - $object->setField2(null); - } - if (\array_key_exists('field_3', $data) && null !== $data['field_3']) { - $object->setField3($data['field_3']); - unset($data['field_3']); - } elseif (\array_key_exists('field_3', $data) && null === $data['field_3']) { - $object->setField3(null); - } - if (\array_key_exists('field_4', $data) && null !== $data['field_4']) { - $object->setField4($data['field_4']); - unset($data['field_4']); - } elseif (\array_key_exists('field_4', $data) && null === $data['field_4']) { - $object->setField4(null); - } - if (\array_key_exists('field_5', $data) && null !== $data['field_5']) { - $object->setField5($data['field_5']); - unset($data['field_5']); - } elseif (\array_key_exists('field_5', $data) && null === $data['field_5']) { - $object->setField5(null); - } - if (\array_key_exists('field_6', $data)) { - $object->setField6($data['field_6']); - unset($data['field_6']); - } - if (\array_key_exists('field_7', $data)) { - $object->setField7($data['field_7']); - unset($data['field_7']); - } - if (\array_key_exists('field_8', $data) && null !== $data['field_8']) { - $object->setField8(\DateTime::createFromFormat('Y-m-d', $data['field_8'])->setTime(0, 0, 0)); - unset($data['field_8']); - } elseif (\array_key_exists('field_8', $data) && null === $data['field_8']) { - $object->setField8(null); - } - if (\array_key_exists('field_9', $data)) { - $object->setField9(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['field_9'])); - unset($data['field_9']); - } - if (\array_key_exists('field_10', $data)) { - $object->setField10($this->denormalizer->denormalize($data['field_10'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class, 'json', $context)); - unset($data['field_10']); - } - if (\array_key_exists('field_11', $data)) { - $object->setField11(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['field_11'])); - unset($data['field_11']); - } - if (\array_key_exists('field_12', $data)) { - $object->setField12($this->denormalizer->denormalize($data['field_12'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class, 'json', $context)); - unset($data['field_12']); - } - if (\array_key_exists('field_13', $data) && null !== $data['field_13']) { - $object->setField13($data['field_13']); - unset($data['field_13']); - } elseif (\array_key_exists('field_13', $data) && null === $data['field_13']) { - $object->setField13(null); - } - if (\array_key_exists('field_14', $data)) { - $values = []; - foreach ($data['field_14'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LinkRowValue::class, 'json', $context); - } - $object->setField14($values); - unset($data['field_14']); - } - if (\array_key_exists('field_15', $data)) { - $values_1 = []; - foreach ($data['field_15'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class, 'json', $context); - } - $object->setField15($values_1); - unset($data['field_15']); - } - if (\array_key_exists('field_16', $data) && null !== $data['field_16']) { - $object->setField16($this->denormalizer->denormalize($data['field_16'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class, 'json', $context)); - unset($data['field_16']); - } elseif (\array_key_exists('field_16', $data) && null === $data['field_16']) { - $object->setField16(null); - } - if (\array_key_exists('field_17', $data) && null !== $data['field_17']) { - $values_2 = []; - foreach ($data['field_17'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setField17($values_2); - unset($data['field_17']); - } elseif (\array_key_exists('field_17', $data) && null === $data['field_17']) { - $object->setField17(null); - } - if (\array_key_exists('field_18', $data) && null !== $data['field_18']) { - $object->setField18($data['field_18']); - unset($data['field_18']); - } elseif (\array_key_exists('field_18', $data) && null === $data['field_18']) { - $object->setField18(null); - } - if (\array_key_exists('field_19', $data) && null !== $data['field_19']) { - $object->setField19($data['field_19']); - unset($data['field_19']); - } elseif (\array_key_exists('field_19', $data) && null === $data['field_19']) { - $object->setField19(null); - } - if (\array_key_exists('field_20', $data) && null !== $data['field_20']) { - $object->setField20($data['field_20']); - unset($data['field_20']); - } elseif (\array_key_exists('field_20', $data) && null === $data['field_20']) { - $object->setField20(null); - } - if (\array_key_exists('field_21', $data) && null !== $data['field_21']) { - $object->setField21($data['field_21']); - unset($data['field_21']); - } elseif (\array_key_exists('field_21', $data) && null === $data['field_21']) { - $object->setField21(null); - } - if (\array_key_exists('field_22', $data) && null !== $data['field_22']) { - $object->setField22($data['field_22']); - unset($data['field_22']); - } elseif (\array_key_exists('field_22', $data) && null === $data['field_22']) { - $object->setField22(null); - } - if (\array_key_exists('field_23', $data)) { - $values_3 = []; - foreach ($data['field_23'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\Collaborator::class, 'json', $context); - } - $object->setField23($values_3); - unset($data['field_23']); - } - if (\array_key_exists('field_24', $data)) { - $object->setField24($data['field_24']); - unset($data['field_24']); - } - if (\array_key_exists('field_25', $data)) { - $object->setField25($data['field_25']); - unset($data['field_25']); - } - if (\array_key_exists('field_26', $data)) { - $object->setField26($data['field_26']); - unset($data['field_26']); - } - if (\array_key_exists('field_27', $data) && null !== $data['field_27']) { - $object->setField27($data['field_27']); - unset($data['field_27']); - } elseif (\array_key_exists('field_27', $data) && null === $data['field_27']) { - $object->setField27(null); - } - foreach ($data as $key => $value_4) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_4; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponse(); + if (\array_key_exists('field_13', $data) && \is_int($data['field_13'])) { + $data['field_13'] = (float) $data['field_13']; + } + if (\array_key_exists('field_7', $data) && \is_int($data['field_7'])) { + $data['field_7'] = (bool) $data['field_7']; + } + if (\array_key_exists('field_26', $data) && \is_int($data['field_26'])) { + $data['field_26'] = (bool) $data['field_26']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('field1') && null !== $object->getField1()) { - $data['field_1'] = $object->getField1(); - } - if ($object->isInitialized('field2') && null !== $object->getField2()) { - $data['field_2'] = $object->getField2(); - } - if ($object->isInitialized('field3') && null !== $object->getField3()) { - $data['field_3'] = $object->getField3(); - } - if ($object->isInitialized('field4') && null !== $object->getField4()) { - $data['field_4'] = $object->getField4(); - } - if ($object->isInitialized('field5') && null !== $object->getField5()) { - $data['field_5'] = $object->getField5(); - } - if ($object->isInitialized('field6') && null !== $object->getField6()) { - $data['field_6'] = $object->getField6(); - } - if ($object->isInitialized('field7') && null !== $object->getField7()) { - $data['field_7'] = $object->getField7(); - } - if ($object->isInitialized('field8') && null !== $object->getField8()) { - $data['field_8'] = $object->getField8()->format('Y-m-d'); - } - if ($object->isInitialized('field9') && null !== $object->getField9()) { - $data['field_9'] = $object->getField9()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('field10') && null !== $object->getField10()) { - $data['field_10'] = $this->normalizer->normalize($object->getField10(), 'json', $context); - } - if ($object->isInitialized('field11') && null !== $object->getField11()) { - $data['field_11'] = $object->getField11()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('field12') && null !== $object->getField12()) { - $data['field_12'] = $this->normalizer->normalize($object->getField12(), 'json', $context); - } - if ($object->isInitialized('field13') && null !== $object->getField13()) { - $data['field_13'] = $object->getField13(); - } - if ($object->isInitialized('field14') && null !== $object->getField14()) { - $values = []; - foreach ($object->getField14() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_14'] = $values; - } - if ($object->isInitialized('field15') && null !== $object->getField15()) { - $values_1 = []; - foreach ($object->getField15() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['field_15'] = $values_1; - } - if ($object->isInitialized('field16') && null !== $object->getField16()) { - $data['field_16'] = $this->normalizer->normalize($object->getField16(), 'json', $context); - } - if ($object->isInitialized('field17') && null !== $object->getField17()) { - $values_2 = []; - foreach ($object->getField17() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['field_17'] = $values_2; - } - if ($object->isInitialized('field18') && null !== $object->getField18()) { - $data['field_18'] = $object->getField18(); - } - if ($object->isInitialized('field19') && null !== $object->getField19()) { - $data['field_19'] = $object->getField19(); - } - if ($object->isInitialized('field20') && null !== $object->getField20()) { - $data['field_20'] = $object->getField20(); - } - if ($object->isInitialized('field21') && null !== $object->getField21()) { - $data['field_21'] = $object->getField21(); - } - if ($object->isInitialized('field22') && null !== $object->getField22()) { - $data['field_22'] = $object->getField22(); - } - if ($object->isInitialized('field23') && null !== $object->getField23()) { - $values_3 = []; - foreach ($object->getField23() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['field_23'] = $values_3; - } - if ($object->isInitialized('field24') && null !== $object->getField24()) { - $data['field_24'] = $object->getField24(); - } - if ($object->isInitialized('field25') && null !== $object->getField25()) { - $data['field_25'] = $object->getField25(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('field_1', $data) && null !== $data['field_1']) { + $object->setField1($data['field_1']); + unset($data['field_1']); + } elseif (\array_key_exists('field_1', $data) && null === $data['field_1']) { + $object->setField1(null); + } + if (\array_key_exists('field_2', $data) && null !== $data['field_2']) { + $object->setField2($data['field_2']); + unset($data['field_2']); + } elseif (\array_key_exists('field_2', $data) && null === $data['field_2']) { + $object->setField2(null); + } + if (\array_key_exists('field_3', $data) && null !== $data['field_3']) { + $object->setField3($data['field_3']); + unset($data['field_3']); + } elseif (\array_key_exists('field_3', $data) && null === $data['field_3']) { + $object->setField3(null); + } + if (\array_key_exists('field_4', $data) && null !== $data['field_4']) { + $object->setField4($data['field_4']); + unset($data['field_4']); + } elseif (\array_key_exists('field_4', $data) && null === $data['field_4']) { + $object->setField4(null); + } + if (\array_key_exists('field_5', $data) && null !== $data['field_5']) { + $object->setField5($data['field_5']); + unset($data['field_5']); + } elseif (\array_key_exists('field_5', $data) && null === $data['field_5']) { + $object->setField5(null); + } + if (\array_key_exists('field_6', $data)) { + $object->setField6($data['field_6']); + unset($data['field_6']); + } + if (\array_key_exists('field_7', $data)) { + $object->setField7($data['field_7']); + unset($data['field_7']); + } + if (\array_key_exists('field_8', $data) && null !== $data['field_8']) { + $object->setField8(\DateTime::createFromFormat('Y-m-d', $data['field_8'])->setTime(0, 0, 0)); + unset($data['field_8']); + } elseif (\array_key_exists('field_8', $data) && null === $data['field_8']) { + $object->setField8(null); + } + if (\array_key_exists('field_9', $data)) { + $object->setField9(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['field_9'])); + unset($data['field_9']); + } + if (\array_key_exists('field_10', $data)) { + $object->setField10($this->denormalizer->denormalize($data['field_10'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class, 'json', $context)); + unset($data['field_10']); + } + if (\array_key_exists('field_11', $data)) { + $object->setField11(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['field_11'])); + unset($data['field_11']); + } + if (\array_key_exists('field_12', $data)) { + $object->setField12($this->denormalizer->denormalize($data['field_12'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class, 'json', $context)); + unset($data['field_12']); + } + if (\array_key_exists('field_13', $data) && null !== $data['field_13']) { + $object->setField13($data['field_13']); + unset($data['field_13']); + } elseif (\array_key_exists('field_13', $data) && null === $data['field_13']) { + $object->setField13(null); + } + if (\array_key_exists('field_14', $data)) { + $values = []; + foreach ($data['field_14'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LinkRowValue::class, 'json', $context); } - if ($object->isInitialized('field26') && null !== $object->getField26()) { - $data['field_26'] = $object->getField26(); + $object->setField14($values); + unset($data['field_14']); + } + if (\array_key_exists('field_15', $data)) { + $values_1 = []; + foreach ($data['field_15'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class, 'json', $context); } - if ($object->isInitialized('field27') && null !== $object->getField27()) { - $data['field_27'] = $object->getField27(); + $object->setField15($values_1); + unset($data['field_15']); + } + if (\array_key_exists('field_16', $data) && null !== $data['field_16']) { + $object->setField16($this->denormalizer->denormalize($data['field_16'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class, 'json', $context)); + unset($data['field_16']); + } elseif (\array_key_exists('field_16', $data) && null === $data['field_16']) { + $object->setField16(null); + } + if (\array_key_exists('field_17', $data) && null !== $data['field_17']) { + $values_2 = []; + foreach ($data['field_17'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); + } + $object->setField17($values_2); + unset($data['field_17']); + } elseif (\array_key_exists('field_17', $data) && null === $data['field_17']) { + $object->setField17(null); + } + if (\array_key_exists('field_18', $data) && null !== $data['field_18']) { + $object->setField18($data['field_18']); + unset($data['field_18']); + } elseif (\array_key_exists('field_18', $data) && null === $data['field_18']) { + $object->setField18(null); + } + if (\array_key_exists('field_19', $data) && null !== $data['field_19']) { + $object->setField19($data['field_19']); + unset($data['field_19']); + } elseif (\array_key_exists('field_19', $data) && null === $data['field_19']) { + $object->setField19(null); + } + if (\array_key_exists('field_20', $data) && null !== $data['field_20']) { + $object->setField20($data['field_20']); + unset($data['field_20']); + } elseif (\array_key_exists('field_20', $data) && null === $data['field_20']) { + $object->setField20(null); + } + if (\array_key_exists('field_21', $data) && null !== $data['field_21']) { + $object->setField21($data['field_21']); + unset($data['field_21']); + } elseif (\array_key_exists('field_21', $data) && null === $data['field_21']) { + $object->setField21(null); + } + if (\array_key_exists('field_22', $data) && null !== $data['field_22']) { + $object->setField22($data['field_22']); + unset($data['field_22']); + } elseif (\array_key_exists('field_22', $data) && null === $data['field_22']) { + $object->setField22(null); + } + if (\array_key_exists('field_23', $data)) { + $values_3 = []; + foreach ($data['field_23'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\Collaborator::class, 'json', $context); } - foreach ($object as $key => $value_4) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_4; - } + $object->setField23($values_3); + unset($data['field_23']); + } + if (\array_key_exists('field_24', $data)) { + $object->setField24($data['field_24']); + unset($data['field_24']); + } + if (\array_key_exists('field_25', $data)) { + $object->setField25($data['field_25']); + unset($data['field_25']); + } + if (\array_key_exists('field_26', $data)) { + $object->setField26($data['field_26']); + unset($data['field_26']); + } + if (\array_key_exists('field_27', $data) && null !== $data['field_27']) { + $object->setField27($data['field_27']); + unset($data['field_27']); + } elseif (\array_key_exists('field_27', $data) && null === $data['field_27']) { + $object->setField27(null); + } + foreach ($data as $key => $value_4) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_4; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => false]; - } + return $object; } -} else { - class ExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class === get_class($data); + if ($data->isInitialized('field1') && null !== $data->getField1()) { + $dataArray['field_1'] = $data->getField1(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExampleRowResponse(); - if (\array_key_exists('field_13', $data) && \is_int($data['field_13'])) { - $data['field_13'] = (float) $data['field_13']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('field_1', $data) && null !== $data['field_1']) { - $object->setField1($data['field_1']); - unset($data['field_1']); - } elseif (\array_key_exists('field_1', $data) && null === $data['field_1']) { - $object->setField1(null); - } - if (\array_key_exists('field_2', $data) && null !== $data['field_2']) { - $object->setField2($data['field_2']); - unset($data['field_2']); - } elseif (\array_key_exists('field_2', $data) && null === $data['field_2']) { - $object->setField2(null); - } - if (\array_key_exists('field_3', $data) && null !== $data['field_3']) { - $object->setField3($data['field_3']); - unset($data['field_3']); - } elseif (\array_key_exists('field_3', $data) && null === $data['field_3']) { - $object->setField3(null); - } - if (\array_key_exists('field_4', $data) && null !== $data['field_4']) { - $object->setField4($data['field_4']); - unset($data['field_4']); - } elseif (\array_key_exists('field_4', $data) && null === $data['field_4']) { - $object->setField4(null); - } - if (\array_key_exists('field_5', $data) && null !== $data['field_5']) { - $object->setField5($data['field_5']); - unset($data['field_5']); - } elseif (\array_key_exists('field_5', $data) && null === $data['field_5']) { - $object->setField5(null); - } - if (\array_key_exists('field_6', $data)) { - $object->setField6($data['field_6']); - unset($data['field_6']); - } - if (\array_key_exists('field_7', $data)) { - $object->setField7($data['field_7']); - unset($data['field_7']); - } - if (\array_key_exists('field_8', $data) && null !== $data['field_8']) { - $object->setField8(\DateTime::createFromFormat('Y-m-d', $data['field_8'])->setTime(0, 0, 0)); - unset($data['field_8']); - } elseif (\array_key_exists('field_8', $data) && null === $data['field_8']) { - $object->setField8(null); - } - if (\array_key_exists('field_9', $data)) { - $object->setField9(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['field_9'])); - unset($data['field_9']); - } - if (\array_key_exists('field_10', $data)) { - $object->setField10($this->denormalizer->denormalize($data['field_10'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class, 'json', $context)); - unset($data['field_10']); - } - if (\array_key_exists('field_11', $data)) { - $object->setField11(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['field_11'])); - unset($data['field_11']); - } - if (\array_key_exists('field_12', $data)) { - $object->setField12($this->denormalizer->denormalize($data['field_12'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class, 'json', $context)); - unset($data['field_12']); - } - if (\array_key_exists('field_13', $data) && null !== $data['field_13']) { - $object->setField13($data['field_13']); - unset($data['field_13']); - } elseif (\array_key_exists('field_13', $data) && null === $data['field_13']) { - $object->setField13(null); - } - if (\array_key_exists('field_14', $data)) { - $values = []; - foreach ($data['field_14'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LinkRowValue::class, 'json', $context); - } - $object->setField14($values); - unset($data['field_14']); - } - if (\array_key_exists('field_15', $data)) { - $values_1 = []; - foreach ($data['field_15'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class, 'json', $context); - } - $object->setField15($values_1); - unset($data['field_15']); - } - if (\array_key_exists('field_16', $data) && null !== $data['field_16']) { - $object->setField16($this->denormalizer->denormalize($data['field_16'], \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class, 'json', $context)); - unset($data['field_16']); - } elseif (\array_key_exists('field_16', $data) && null === $data['field_16']) { - $object->setField16(null); - } - if (\array_key_exists('field_17', $data) && null !== $data['field_17']) { - $values_2 = []; - foreach ($data['field_17'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setField17($values_2); - unset($data['field_17']); - } elseif (\array_key_exists('field_17', $data) && null === $data['field_17']) { - $object->setField17(null); - } - if (\array_key_exists('field_18', $data) && null !== $data['field_18']) { - $object->setField18($data['field_18']); - unset($data['field_18']); - } elseif (\array_key_exists('field_18', $data) && null === $data['field_18']) { - $object->setField18(null); - } - if (\array_key_exists('field_19', $data) && null !== $data['field_19']) { - $object->setField19($data['field_19']); - unset($data['field_19']); - } elseif (\array_key_exists('field_19', $data) && null === $data['field_19']) { - $object->setField19(null); - } - if (\array_key_exists('field_20', $data) && null !== $data['field_20']) { - $object->setField20($data['field_20']); - unset($data['field_20']); - } elseif (\array_key_exists('field_20', $data) && null === $data['field_20']) { - $object->setField20(null); - } - if (\array_key_exists('field_21', $data) && null !== $data['field_21']) { - $object->setField21($data['field_21']); - unset($data['field_21']); - } elseif (\array_key_exists('field_21', $data) && null === $data['field_21']) { - $object->setField21(null); - } - if (\array_key_exists('field_22', $data) && null !== $data['field_22']) { - $object->setField22($data['field_22']); - unset($data['field_22']); - } elseif (\array_key_exists('field_22', $data) && null === $data['field_22']) { - $object->setField22(null); - } - if (\array_key_exists('field_23', $data)) { - $values_3 = []; - foreach ($data['field_23'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\Collaborator::class, 'json', $context); - } - $object->setField23($values_3); - unset($data['field_23']); - } - if (\array_key_exists('field_24', $data)) { - $object->setField24($data['field_24']); - unset($data['field_24']); - } - if (\array_key_exists('field_25', $data)) { - $object->setField25($data['field_25']); - unset($data['field_25']); - } - if (\array_key_exists('field_26', $data)) { - $object->setField26($data['field_26']); - unset($data['field_26']); - } - if (\array_key_exists('field_27', $data) && null !== $data['field_27']) { - $object->setField27($data['field_27']); - unset($data['field_27']); - } elseif (\array_key_exists('field_27', $data) && null === $data['field_27']) { - $object->setField27(null); - } - foreach ($data as $key => $value_4) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_4; - } - } - - return $object; + if ($data->isInitialized('field2') && null !== $data->getField2()) { + $dataArray['field_2'] = $data->getField2(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('field1') && null !== $object->getField1()) { - $data['field_1'] = $object->getField1(); - } - if ($object->isInitialized('field2') && null !== $object->getField2()) { - $data['field_2'] = $object->getField2(); - } - if ($object->isInitialized('field3') && null !== $object->getField3()) { - $data['field_3'] = $object->getField3(); - } - if ($object->isInitialized('field4') && null !== $object->getField4()) { - $data['field_4'] = $object->getField4(); - } - if ($object->isInitialized('field5') && null !== $object->getField5()) { - $data['field_5'] = $object->getField5(); - } - if ($object->isInitialized('field6') && null !== $object->getField6()) { - $data['field_6'] = $object->getField6(); - } - if ($object->isInitialized('field7') && null !== $object->getField7()) { - $data['field_7'] = $object->getField7(); - } - if ($object->isInitialized('field8') && null !== $object->getField8()) { - $data['field_8'] = $object->getField8()->format('Y-m-d'); - } - if ($object->isInitialized('field9') && null !== $object->getField9()) { - $data['field_9'] = $object->getField9()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('field10') && null !== $object->getField10()) { - $data['field_10'] = $this->normalizer->normalize($object->getField10(), 'json', $context); - } - if ($object->isInitialized('field11') && null !== $object->getField11()) { - $data['field_11'] = $object->getField11()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('field12') && null !== $object->getField12()) { - $data['field_12'] = $this->normalizer->normalize($object->getField12(), 'json', $context); - } - if ($object->isInitialized('field13') && null !== $object->getField13()) { - $data['field_13'] = $object->getField13(); - } - if ($object->isInitialized('field14') && null !== $object->getField14()) { - $values = []; - foreach ($object->getField14() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_14'] = $values; - } - if ($object->isInitialized('field15') && null !== $object->getField15()) { - $values_1 = []; - foreach ($object->getField15() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['field_15'] = $values_1; - } - if ($object->isInitialized('field16') && null !== $object->getField16()) { - $data['field_16'] = $this->normalizer->normalize($object->getField16(), 'json', $context); - } - if ($object->isInitialized('field17') && null !== $object->getField17()) { - $values_2 = []; - foreach ($object->getField17() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['field_17'] = $values_2; - } - if ($object->isInitialized('field18') && null !== $object->getField18()) { - $data['field_18'] = $object->getField18(); - } - if ($object->isInitialized('field19') && null !== $object->getField19()) { - $data['field_19'] = $object->getField19(); - } - if ($object->isInitialized('field20') && null !== $object->getField20()) { - $data['field_20'] = $object->getField20(); - } - if ($object->isInitialized('field21') && null !== $object->getField21()) { - $data['field_21'] = $object->getField21(); - } - if ($object->isInitialized('field22') && null !== $object->getField22()) { - $data['field_22'] = $object->getField22(); - } - if ($object->isInitialized('field23') && null !== $object->getField23()) { - $values_3 = []; - foreach ($object->getField23() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['field_23'] = $values_3; - } - if ($object->isInitialized('field24') && null !== $object->getField24()) { - $data['field_24'] = $object->getField24(); + if ($data->isInitialized('field3') && null !== $data->getField3()) { + $dataArray['field_3'] = $data->getField3(); + } + if ($data->isInitialized('field4') && null !== $data->getField4()) { + $dataArray['field_4'] = $data->getField4(); + } + if ($data->isInitialized('field5') && null !== $data->getField5()) { + $dataArray['field_5'] = $data->getField5(); + } + if ($data->isInitialized('field6') && null !== $data->getField6()) { + $dataArray['field_6'] = $data->getField6(); + } + if ($data->isInitialized('field7') && null !== $data->getField7()) { + $dataArray['field_7'] = $data->getField7(); + } + if ($data->isInitialized('field8') && null !== $data->getField8()) { + $dataArray['field_8'] = $data->getField8()->format('Y-m-d'); + } + if ($data->isInitialized('field9') && null !== $data->getField9()) { + $dataArray['field_9'] = $data->getField9()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('field10') && null !== $data->getField10()) { + $dataArray['field_10'] = $this->normalizer->normalize($data->getField10(), 'json', $context); + } + if ($data->isInitialized('field11') && null !== $data->getField11()) { + $dataArray['field_11'] = $data->getField11()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('field12') && null !== $data->getField12()) { + $dataArray['field_12'] = $this->normalizer->normalize($data->getField12(), 'json', $context); + } + if ($data->isInitialized('field13') && null !== $data->getField13()) { + $dataArray['field_13'] = $data->getField13(); + } + if ($data->isInitialized('field14') && null !== $data->getField14()) { + $values = []; + foreach ($data->getField14() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('field25') && null !== $object->getField25()) { - $data['field_25'] = $object->getField25(); + $dataArray['field_14'] = $values; + } + if ($data->isInitialized('field15') && null !== $data->getField15()) { + $values_1 = []; + foreach ($data->getField15() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - if ($object->isInitialized('field26') && null !== $object->getField26()) { - $data['field_26'] = $object->getField26(); + $dataArray['field_15'] = $values_1; + } + if ($data->isInitialized('field16') && null !== $data->getField16()) { + $dataArray['field_16'] = $this->normalizer->normalize($data->getField16(), 'json', $context); + } + if ($data->isInitialized('field17') && null !== $data->getField17()) { + $values_2 = []; + foreach ($data->getField17() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - if ($object->isInitialized('field27') && null !== $object->getField27()) { - $data['field_27'] = $object->getField27(); + $dataArray['field_17'] = $values_2; + } + if ($data->isInitialized('field18') && null !== $data->getField18()) { + $dataArray['field_18'] = $data->getField18(); + } + if ($data->isInitialized('field19') && null !== $data->getField19()) { + $dataArray['field_19'] = $data->getField19(); + } + if ($data->isInitialized('field20') && null !== $data->getField20()) { + $dataArray['field_20'] = $data->getField20(); + } + if ($data->isInitialized('field21') && null !== $data->getField21()) { + $dataArray['field_21'] = $data->getField21(); + } + if ($data->isInitialized('field22') && null !== $data->getField22()) { + $dataArray['field_22'] = $data->getField22(); + } + if ($data->isInitialized('field23') && null !== $data->getField23()) { + $values_3 = []; + foreach ($data->getField23() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - foreach ($object as $key => $value_4) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_4; - } + $dataArray['field_23'] = $values_3; + } + if ($data->isInitialized('field24') && null !== $data->getField24()) { + $dataArray['field_24'] = $data->getField24(); + } + if ($data->isInitialized('field25') && null !== $data->getField25()) { + $dataArray['field_25'] = $data->getField25(); + } + if ($data->isInitialized('field26') && null !== $data->getField26()) { + $dataArray['field_26'] = $data->getField26(); + } + if ($data->isInitialized('field27') && null !== $data->getField27()) { + $dataArray['field_27'] = $data->getField27(); + } + foreach ($data as $key => $value_4) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_4; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => false]; } } diff --git a/generated/Normalizer/ExportJobNormalizer.php b/generated/Normalizer/ExportJobNormalizer.php index 12e8c27..1adf11f 100644 --- a/generated/Normalizer/ExportJobNormalizer.php +++ b/generated/Normalizer/ExportJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,245 +20,121 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ExportJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ExportJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ExportJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExportJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExportJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExportJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExportJob(); - if (\array_key_exists('progress_percentage', $data) && \is_int($data['progress_percentage'])) { - $data['progress_percentage'] = (float) $data['progress_percentage']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table', $data) && null !== $data['table']) { - $object->setTable($data['table']); - unset($data['table']); - } elseif (\array_key_exists('table', $data) && null === $data['table']) { - $object->setTable(null); - } - if (\array_key_exists('view', $data) && null !== $data['view']) { - $object->setView($data['view']); - unset($data['view']); - } elseif (\array_key_exists('view', $data) && null === $data['view']) { - $object->setView(null); - } - if (\array_key_exists('exporter_type', $data)) { - $object->setExporterType($data['exporter_type']); - unset($data['exporter_type']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('status', $data)) { - $object->setStatus($data['status']); - unset($data['status']); - } - if (\array_key_exists('exported_file_name', $data) && null !== $data['exported_file_name']) { - $object->setExportedFileName($data['exported_file_name']); - unset($data['exported_file_name']); - } elseif (\array_key_exists('exported_file_name', $data) && null === $data['exported_file_name']) { - $object->setExportedFileName(null); - } - if (\array_key_exists('created_at', $data)) { - $object->setCreatedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_at'])); - unset($data['created_at']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ExportJob(); + if (\array_key_exists('progress_percentage', $data) && \is_int($data['progress_percentage'])) { + $data['progress_percentage'] = (float) $data['progress_percentage']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('table') && null !== $object->getTable()) { - $data['table'] = $object->getTable(); - } - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - $data['exporter_type'] = $object->getExporterType(); - $data['state'] = $object->getState(); - if ($object->isInitialized('exportedFileName') && null !== $object->getExportedFileName()) { - $data['exported_file_name'] = $object->getExportedFileName(); - } - if ($object->isInitialized('progressPercentage') && null !== $object->getProgressPercentage()) { - $data['progress_percentage'] = $object->getProgressPercentage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table', $data) && null !== $data['table']) { + $object->setTable($data['table']); + unset($data['table']); + } elseif (\array_key_exists('table', $data) && null === $data['table']) { + $object->setTable(null); + } + if (\array_key_exists('view', $data) && null !== $data['view']) { + $object->setView($data['view']); + unset($data['view']); + } elseif (\array_key_exists('view', $data) && null === $data['view']) { + $object->setView(null); + } + if (\array_key_exists('exporter_type', $data)) { + $object->setExporterType($data['exporter_type']); + unset($data['exporter_type']); + } + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); + } + if (\array_key_exists('status', $data)) { + $object->setStatus($data['status']); + unset($data['status']); + } + if (\array_key_exists('exported_file_name', $data) && null !== $data['exported_file_name']) { + $object->setExportedFileName($data['exported_file_name']); + unset($data['exported_file_name']); + } elseif (\array_key_exists('exported_file_name', $data) && null === $data['exported_file_name']) { + $object->setExportedFileName(null); + } + if (\array_key_exists('created_at', $data)) { + $object->setCreatedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_at'])); + unset($data['created_at']); + } + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExportJob::class => false]; - } + return $object; } -} else { - class ExportJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ExportJob::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('table') && null !== $data->getTable()) { + $dataArray['table'] = $data->getTable(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ExportJob::class === get_class($data); + if ($data->isInitialized('view') && null !== $data->getView()) { + $dataArray['view'] = $data->getView(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ExportJob(); - if (\array_key_exists('progress_percentage', $data) && \is_int($data['progress_percentage'])) { - $data['progress_percentage'] = (float) $data['progress_percentage']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table', $data) && null !== $data['table']) { - $object->setTable($data['table']); - unset($data['table']); - } elseif (\array_key_exists('table', $data) && null === $data['table']) { - $object->setTable(null); - } - if (\array_key_exists('view', $data) && null !== $data['view']) { - $object->setView($data['view']); - unset($data['view']); - } elseif (\array_key_exists('view', $data) && null === $data['view']) { - $object->setView(null); - } - if (\array_key_exists('exporter_type', $data)) { - $object->setExporterType($data['exporter_type']); - unset($data['exporter_type']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('status', $data)) { - $object->setStatus($data['status']); - unset($data['status']); - } - if (\array_key_exists('exported_file_name', $data) && null !== $data['exported_file_name']) { - $object->setExportedFileName($data['exported_file_name']); - unset($data['exported_file_name']); - } elseif (\array_key_exists('exported_file_name', $data) && null === $data['exported_file_name']) { - $object->setExportedFileName(null); - } - if (\array_key_exists('created_at', $data)) { - $object->setCreatedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_at'])); - unset($data['created_at']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + $dataArray['exporter_type'] = $data->getExporterType(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('exportedFileName') && null !== $data->getExportedFileName()) { + $dataArray['exported_file_name'] = $data->getExportedFileName(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('table') && null !== $object->getTable()) { - $data['table'] = $object->getTable(); - } - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - $data['exporter_type'] = $object->getExporterType(); - $data['state'] = $object->getState(); - if ($object->isInitialized('exportedFileName') && null !== $object->getExportedFileName()) { - $data['exported_file_name'] = $object->getExportedFileName(); - } - if ($object->isInitialized('progressPercentage') && null !== $object->getProgressPercentage()) { - $data['progress_percentage'] = $object->getProgressPercentage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('progressPercentage') && null !== $data->getProgressPercentage()) { + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ExportJob::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ExportJob::class => false]; } } diff --git a/generated/Normalizer/FacebookAuthProviderModelAuthProviderNormalizer.php b/generated/Normalizer/FacebookAuthProviderModelAuthProviderNormalizer.php index 03f7741..183a3fd 100644 --- a/generated/Normalizer/FacebookAuthProviderModelAuthProviderNormalizer.php +++ b/generated/Normalizer/FacebookAuthProviderModelAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,197 +20,100 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FacebookAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FacebookAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider(); + if (\array_key_exists('enabled', $data) && \is_int($data['enabled'])) { + $data['enabled'] = (bool) $data['enabled']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + unset($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('enabled', $data)) { + $object->setEnabled($data['enabled']); + unset($data['enabled']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('client_id', $data)) { + $object->setClientId($data['client_id']); + unset($data['client_id']); + } + if (\array_key_exists('secret', $data)) { + $object->setSecret($data['secret']); + unset($data['secret']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => false]; - } + return $object; } -} else { - class FacebookAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('domain') && null !== $data->getDomain()) { + $dataArray['domain'] = $data->getDomain(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class === get_class($data); + if ($data->isInitialized('enabled') && null !== $data->getEnabled()) { + $dataArray['enabled'] = $data->getEnabled(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); + $dataArray['name'] = $data->getName(); + $dataArray['client_id'] = $data->getClientId(); + $dataArray['secret'] = $data->getSecret(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => false]; } } diff --git a/generated/Normalizer/FieldNormalizer.php b/generated/Normalizer/FieldNormalizer.php index f12d7ad..02fe79a 100644 --- a/generated/Normalizer/FieldNormalizer.php +++ b/generated/Normalizer/FieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Field::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Field::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Field::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Field::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Field(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Field(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Field::class => false]; - } + return $object; } -} else { - class FieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Field::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Field::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Field(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Field::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Field::class => false]; } } diff --git a/generated/Normalizer/FieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/FieldSerializerWithRelatedFieldsNormalizer.php index faab05e..4ec3092 100644 --- a/generated/Normalizer/FieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/FieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class FieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/FileFieldCreateFieldNormalizer.php b/generated/Normalizer/FileFieldCreateFieldNormalizer.php index 47af11d..ebb106f 100644 --- a/generated/Normalizer/FileFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/FileFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FileFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FileFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FileFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class FileFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/FileFieldFieldNormalizer.php b/generated/Normalizer/FileFieldFieldNormalizer.php index 7fc8ac6..05b6e71 100644 --- a/generated/Normalizer/FileFieldFieldNormalizer.php +++ b/generated/Normalizer/FileFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FileFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FileFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FileFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FileFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldField::class => false]; - } + return $object; } -} else { - class FileFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FileFieldField::class => false]; } } diff --git a/generated/Normalizer/FileFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/FileFieldFieldSerializerWithRelatedFieldsNormalizer.php index 66ea977..4d35093 100644 --- a/generated/Normalizer/FileFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/FileFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FileFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FileFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class FileFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/FileFieldResponseNormalizer.php b/generated/Normalizer/FileFieldResponseNormalizer.php index 8a37e60..3b0f6ca 100644 --- a/generated/Normalizer/FileFieldResponseNormalizer.php +++ b/generated/Normalizer/FileFieldResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,223 +20,113 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FileFieldResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FileFieldResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('visible_name', $data)) { - $object->setVisibleName($data['visible_name']); - unset($data['visible_name']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data)) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } - if (\array_key_exists('image_height', $data)) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FileFieldResponse(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['visible_name'] = $object->getVisibleName(); - $data['name'] = $object->getName(); - $data['size'] = $object->getSize(); - $data['mime_type'] = $object->getMimeType(); - $data['is_image'] = $object->getIsImage(); - $data['image_width'] = $object->getImageWidth(); - $data['image_height'] = $object->getImageHeight(); - $data['uploaded_at'] = $object->getUploadedAt()?->format('Y-m-d\TH:i:sP'); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - - return $data; + $object->setThumbnails($values); + unset($data['thumbnails']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => false]; + if (\array_key_exists('visible_name', $data)) { + $object->setVisibleName($data['visible_name']); + unset($data['visible_name']); } - } -} else { - class FileFieldResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class === get_class($data); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('visible_name', $data)) { - $object->setVisibleName($data['visible_name']); - unset($data['visible_name']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data)) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } - if (\array_key_exists('image_height', $data)) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data)) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } + if (\array_key_exists('image_height', $data)) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['visible_name'] = $object->getVisibleName(); - $data['name'] = $object->getName(); - $data['size'] = $object->getSize(); - $data['mime_type'] = $object->getMimeType(); - $data['is_image'] = $object->getIsImage(); - $data['image_width'] = $object->getImageWidth(); - $data['image_height'] = $object->getImageHeight(); - $data['uploaded_at'] = $object->getUploadedAt()?->format('Y-m-d\TH:i:sP'); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['visible_name'] = $data->getVisibleName(); + $dataArray['name'] = $data->getName(); + $dataArray['size'] = $data->getSize(); + $dataArray['mime_type'] = $data->getMimeType(); + $dataArray['is_image'] = $data->getIsImage(); + $dataArray['image_width'] = $data->getImageWidth(); + $dataArray['image_height'] = $data->getImageHeight(); + $dataArray['uploaded_at'] = $data->getUploadedAt()?->format('Y-m-d\TH:i:sP'); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => false]; } } diff --git a/generated/Normalizer/FileFieldUpdateFieldNormalizer.php b/generated/Normalizer/FileFieldUpdateFieldNormalizer.php index 5da5e67..ac2e291 100644 --- a/generated/Normalizer/FileFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/FileFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FileFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FileFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => false]; - } + return $object; } -} else { - class FileFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/FileImportJobCreateJobNormalizer.php b/generated/Normalizer/FileImportJobCreateJobNormalizer.php index 1263b9d..6ebae6d 100644 --- a/generated/Normalizer/FileImportJobCreateJobNormalizer.php +++ b/generated/Normalizer/FileImportJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FileImportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FileImportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => false]; - } + return $object; } -} else { - class FileImportJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/FileImportJobJobNormalizer.php b/generated/Normalizer/FileImportJobJobNormalizer.php index 5a10132..3874c86 100644 --- a/generated/Normalizer/FileImportJobJobNormalizer.php +++ b/generated/Normalizer/FileImportJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,231 +20,117 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FileImportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FileImportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('first_row_header', $data)) { - $object->setFirstRowHeader($data['first_row_header']); - unset($data['first_row_header']); - } - if (\array_key_exists('report', $data)) { - $object->setReport($this->denormalizer->denormalize($data['report'], \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class, 'json', $context)); - unset($data['report']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobJob(); + if (\array_key_exists('first_row_header', $data) && \is_int($data['first_row_header'])) { + $data['first_row_header'] = (bool) $data['first_row_header']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - $data['database_id'] = $object->getDatabaseId(); - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('firstRowHeader') && null !== $object->getFirstRowHeader()) { - $data['first_row_header'] = $object->getFirstRowHeader(); - } - $data['report'] = $this->normalizer->normalize($object->getReport(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); + } + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); + } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('first_row_header', $data)) { + $object->setFirstRowHeader($data['first_row_header']); + unset($data['first_row_header']); + } + if (\array_key_exists('report', $data)) { + $object->setReport($this->denormalizer->denormalize($data['report'], \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class, 'json', $context)); + unset($data['report']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => false]; - } + return $object; } -} else { - class FileImportJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class === get_class($data); + $dataArray['database_id'] = $data->getDatabaseId(); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('first_row_header', $data)) { - $object->setFirstRowHeader($data['first_row_header']); - unset($data['first_row_header']); - } - if (\array_key_exists('report', $data)) { - $object->setReport($this->denormalizer->denormalize($data['report'], \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class, 'json', $context)); - unset($data['report']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - $data['database_id'] = $object->getDatabaseId(); - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('firstRowHeader') && null !== $object->getFirstRowHeader()) { - $data['first_row_header'] = $object->getFirstRowHeader(); - } - $data['report'] = $this->normalizer->normalize($object->getReport(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('firstRowHeader') && null !== $data->getFirstRowHeader()) { + $dataArray['first_row_header'] = $data->getFirstRowHeader(); + } + $dataArray['report'] = $this->normalizer->normalize($data->getReport(), 'json', $context); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => false]; } } diff --git a/generated/Normalizer/FileImportJobJobReportNormalizer.php b/generated/Normalizer/FileImportJobJobReportNormalizer.php index f20a872..0714f2c 100644 --- a/generated/Normalizer/FileImportJobJobReportNormalizer.php +++ b/generated/Normalizer/FileImportJobJobReportNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,67 +20,39 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FileImportJobJobReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FileImportJobJobReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('failing_rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['failing_rows'] as $key => $value) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; - } - $object->setFailingRows($values); - unset($data['failing_rows']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getFailingRows() as $key => $value) { - $values_1 = []; + if (\array_key_exists('failing_rows', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['failing_rows'] as $key => $value) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($value as $key_1 => $value_1) { $values_2 = []; foreach ($value_1 as $value_2) { @@ -91,107 +62,45 @@ public function normalize(mixed $object, ?string $format = null, array $context } $values[$key] = $values_1; } - $data['failing_rows'] = $values; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $object->setFailingRows($values); + unset($data['failing_rows']); + } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => false]; - } + return $object; } -} else { - class FileImportJobJobReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('failing_rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['failing_rows'] as $key => $value) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; - } - $object->setFailingRows($values); - unset($data['failing_rows']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getFailingRows() as $key => $value) { + $values_1 = []; + foreach ($value as $key_1 => $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; } + $values_1[$key_1] = $values_2; } - - return $object; + $values[$key] = $values_1; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFailingRows() as $key => $value) { - $values_1 = []; - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; + $dataArray['failing_rows'] = $values; + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $dataArray[$key_2] = $value_3; } - $data['failing_rows'] = $values; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => false]; } } diff --git a/generated/Normalizer/FormContainerElementCreateElementNormalizer.php b/generated/Normalizer/FormContainerElementCreateElementNormalizer.php index f077a3b..027f496 100644 --- a/generated/Normalizer/FormContainerElementCreateElementNormalizer.php +++ b/generated/Normalizer/FormContainerElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,575 +20,289 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormContainerElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormContainerElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('submit_button_label', $data)) { - $object->setSubmitButtonLabel($data['submit_button_label']); - unset($data['submit_button_label']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - if (\array_key_exists('reset_initial_values_post_submission', $data)) { - $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); - unset($data['reset_initial_values_post_submission']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement(); + if (\array_key_exists('reset_initial_values_post_submission', $data) && \is_int($data['reset_initial_values_post_submission'])) { + $data['reset_initial_values_post_submission'] = (bool) $data['reset_initial_values_post_submission']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('submitButtonLabel') && null !== $object->getSubmitButtonLabel()) { - $data['submit_button_label'] = $object->getSubmitButtonLabel(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - if ($object->isInitialized('resetInitialValuesPostSubmission') && null !== $object->getResetInitialValuesPostSubmission()) { - $data['reset_initial_values_post_submission'] = $object->getResetInitialValuesPostSubmission(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('submit_button_label', $data)) { + $object->setSubmitButtonLabel($data['submit_button_label']); + unset($data['submit_button_label']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + if (\array_key_exists('reset_initial_values_post_submission', $data)) { + $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); + unset($data['reset_initial_values_post_submission']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => false]; - } + return $object; } -} else { - class FormContainerElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('submit_button_label', $data)) { - $object->setSubmitButtonLabel($data['submit_button_label']); - unset($data['submit_button_label']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - if (\array_key_exists('reset_initial_values_post_submission', $data)) { - $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); - unset($data['reset_initial_values_post_submission']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('submitButtonLabel') && null !== $object->getSubmitButtonLabel()) { - $data['submit_button_label'] = $object->getSubmitButtonLabel(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - if ($object->isInitialized('resetInitialValuesPostSubmission') && null !== $object->getResetInitialValuesPostSubmission()) { - $data['reset_initial_values_post_submission'] = $object->getResetInitialValuesPostSubmission(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('submitButtonLabel') && null !== $data->getSubmitButtonLabel()) { + $dataArray['submit_button_label'] = $data->getSubmitButtonLabel(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + if ($data->isInitialized('resetInitialValuesPostSubmission') && null !== $data->getResetInitialValuesPostSubmission()) { + $dataArray['reset_initial_values_post_submission'] = $data->getResetInitialValuesPostSubmission(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/FormContainerElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/FormContainerElementCreateElementStyleBackgroundFileNormalizer.php index b077176..8e4bb0e 100644 --- a/generated/Normalizer/FormContainerElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/FormContainerElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormContainerElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormContainerElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class FormContainerElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/FormContainerElementElementNormalizer.php b/generated/Normalizer/FormContainerElementElementNormalizer.php index 684eb6b..2c853ce 100644 --- a/generated/Normalizer/FormContainerElementElementNormalizer.php +++ b/generated/Normalizer/FormContainerElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,605 +20,304 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormContainerElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormContainerElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('submit_button_label', $data)) { - $object->setSubmitButtonLabel($data['submit_button_label']); - unset($data['submit_button_label']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - if (\array_key_exists('reset_initial_values_post_submission', $data)) { - $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); - unset($data['reset_initial_values_post_submission']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementElement(); + if (\array_key_exists('reset_initial_values_post_submission', $data) && \is_int($data['reset_initial_values_post_submission'])) { + $data['reset_initial_values_post_submission'] = (bool) $data['reset_initial_values_post_submission']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('submitButtonLabel') && null !== $object->getSubmitButtonLabel()) { - $data['submit_button_label'] = $object->getSubmitButtonLabel(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - if ($object->isInitialized('resetInitialValuesPostSubmission') && null !== $object->getResetInitialValuesPostSubmission()) { - $data['reset_initial_values_post_submission'] = $object->getResetInitialValuesPostSubmission(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('submit_button_label', $data)) { + $object->setSubmitButtonLabel($data['submit_button_label']); + unset($data['submit_button_label']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + if (\array_key_exists('reset_initial_values_post_submission', $data)) { + $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); + unset($data['reset_initial_values_post_submission']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => false]; - } + return $object; } -} else { - class FormContainerElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('submit_button_label', $data)) { - $object->setSubmitButtonLabel($data['submit_button_label']); - unset($data['submit_button_label']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - if (\array_key_exists('reset_initial_values_post_submission', $data)) { - $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); - unset($data['reset_initial_values_post_submission']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('submitButtonLabel') && null !== $object->getSubmitButtonLabel()) { - $data['submit_button_label'] = $object->getSubmitButtonLabel(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - if ($object->isInitialized('resetInitialValuesPostSubmission') && null !== $object->getResetInitialValuesPostSubmission()) { - $data['reset_initial_values_post_submission'] = $object->getResetInitialValuesPostSubmission(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('submitButtonLabel') && null !== $data->getSubmitButtonLabel()) { + $dataArray['submit_button_label'] = $data->getSubmitButtonLabel(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + if ($data->isInitialized('resetInitialValuesPostSubmission') && null !== $data->getResetInitialValuesPostSubmission()) { + $dataArray['reset_initial_values_post_submission'] = $data->getResetInitialValuesPostSubmission(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => false]; } } diff --git a/generated/Normalizer/FormContainerElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/FormContainerElementElementStyleBackgroundFileNormalizer.php index 7a76bed..c358c0a 100644 --- a/generated/Normalizer/FormContainerElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/FormContainerElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormContainerElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormContainerElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class FormContainerElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/FormContainerElementPublicElementNormalizer.php b/generated/Normalizer/FormContainerElementPublicElementNormalizer.php index cd9a135..5fe2307 100644 --- a/generated/Normalizer/FormContainerElementPublicElementNormalizer.php +++ b/generated/Normalizer/FormContainerElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,597 +20,300 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormContainerElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormContainerElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('submit_button_label', $data)) { - $object->setSubmitButtonLabel($data['submit_button_label']); - unset($data['submit_button_label']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - if (\array_key_exists('reset_initial_values_post_submission', $data)) { - $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); - unset($data['reset_initial_values_post_submission']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement(); + if (\array_key_exists('reset_initial_values_post_submission', $data) && \is_int($data['reset_initial_values_post_submission'])) { + $data['reset_initial_values_post_submission'] = (bool) $data['reset_initial_values_post_submission']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('submitButtonLabel') && null !== $object->getSubmitButtonLabel()) { - $data['submit_button_label'] = $object->getSubmitButtonLabel(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - if ($object->isInitialized('resetInitialValuesPostSubmission') && null !== $object->getResetInitialValuesPostSubmission()) { - $data['reset_initial_values_post_submission'] = $object->getResetInitialValuesPostSubmission(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('submit_button_label', $data)) { + $object->setSubmitButtonLabel($data['submit_button_label']); + unset($data['submit_button_label']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + if (\array_key_exists('reset_initial_values_post_submission', $data)) { + $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); + unset($data['reset_initial_values_post_submission']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => false]; - } + return $object; } -} else { - class FormContainerElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('submit_button_label', $data)) { - $object->setSubmitButtonLabel($data['submit_button_label']); - unset($data['submit_button_label']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - if (\array_key_exists('reset_initial_values_post_submission', $data)) { - $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); - unset($data['reset_initial_values_post_submission']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('submitButtonLabel') && null !== $object->getSubmitButtonLabel()) { - $data['submit_button_label'] = $object->getSubmitButtonLabel(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - if ($object->isInitialized('resetInitialValuesPostSubmission') && null !== $object->getResetInitialValuesPostSubmission()) { - $data['reset_initial_values_post_submission'] = $object->getResetInitialValuesPostSubmission(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('submitButtonLabel') && null !== $data->getSubmitButtonLabel()) { + $dataArray['submit_button_label'] = $data->getSubmitButtonLabel(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + if ($data->isInitialized('resetInitialValuesPostSubmission') && null !== $data->getResetInitialValuesPostSubmission()) { + $dataArray['reset_initial_values_post_submission'] = $data->getResetInitialValuesPostSubmission(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/FormContainerElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/FormContainerElementPublicElementStyleBackgroundFileNormalizer.php index 1e46d86..594c3e3 100644 --- a/generated/Normalizer/FormContainerElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/FormContainerElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormContainerElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormContainerElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class FormContainerElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/FormContainerElementUpdateElementNormalizer.php b/generated/Normalizer/FormContainerElementUpdateElementNormalizer.php index 265fc59..255b59b 100644 --- a/generated/Normalizer/FormContainerElementUpdateElementNormalizer.php +++ b/generated/Normalizer/FormContainerElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,543 +20,273 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormContainerElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormContainerElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('submit_button_label', $data)) { - $object->setSubmitButtonLabel($data['submit_button_label']); - unset($data['submit_button_label']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - if (\array_key_exists('reset_initial_values_post_submission', $data)) { - $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); - unset($data['reset_initial_values_post_submission']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement(); + if (\array_key_exists('reset_initial_values_post_submission', $data) && \is_int($data['reset_initial_values_post_submission'])) { + $data['reset_initial_values_post_submission'] = (bool) $data['reset_initial_values_post_submission']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('submitButtonLabel') && null !== $object->getSubmitButtonLabel()) { - $data['submit_button_label'] = $object->getSubmitButtonLabel(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - if ($object->isInitialized('resetInitialValuesPostSubmission') && null !== $object->getResetInitialValuesPostSubmission()) { - $data['reset_initial_values_post_submission'] = $object->getResetInitialValuesPostSubmission(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('submit_button_label', $data)) { + $object->setSubmitButtonLabel($data['submit_button_label']); + unset($data['submit_button_label']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + if (\array_key_exists('reset_initial_values_post_submission', $data)) { + $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); + unset($data['reset_initial_values_post_submission']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => false]; - } + return $object; } -} else { - class FormContainerElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('submit_button_label', $data)) { - $object->setSubmitButtonLabel($data['submit_button_label']); - unset($data['submit_button_label']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - if (\array_key_exists('reset_initial_values_post_submission', $data)) { - $object->setResetInitialValuesPostSubmission($data['reset_initial_values_post_submission']); - unset($data['reset_initial_values_post_submission']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('submitButtonLabel') && null !== $object->getSubmitButtonLabel()) { - $data['submit_button_label'] = $object->getSubmitButtonLabel(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); - } - if ($object->isInitialized('resetInitialValuesPostSubmission') && null !== $object->getResetInitialValuesPostSubmission()) { - $data['reset_initial_values_post_submission'] = $object->getResetInitialValuesPostSubmission(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('submitButtonLabel') && null !== $data->getSubmitButtonLabel()) { + $dataArray['submit_button_label'] = $data->getSubmitButtonLabel(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + if ($data->isInitialized('resetInitialValuesPostSubmission') && null !== $data->getResetInitialValuesPostSubmission()) { + $dataArray['reset_initial_values_post_submission'] = $data->getResetInitialValuesPostSubmission(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/FormContainerElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/FormContainerElementUpdateElementStyleBackgroundFileNormalizer.php index e151de8..7848b36 100644 --- a/generated/Normalizer/FormContainerElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/FormContainerElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormContainerElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormContainerElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class FormContainerElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/FormViewCreateViewCoverImageNormalizer.php b/generated/Normalizer/FormViewCreateViewCoverImageNormalizer.php index 4d13b5f..2030617 100644 --- a/generated/Normalizer/FormViewCreateViewCoverImageNormalizer.php +++ b/generated/Normalizer/FormViewCreateViewCoverImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewCreateViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewCreateViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => false]; - } + return $object; } -} else { - class FormViewCreateViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => false]; } } diff --git a/generated/Normalizer/FormViewCreateViewLogoImageNormalizer.php b/generated/Normalizer/FormViewCreateViewLogoImageNormalizer.php index ebde35c..a605c66 100644 --- a/generated/Normalizer/FormViewCreateViewLogoImageNormalizer.php +++ b/generated/Normalizer/FormViewCreateViewLogoImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewCreateViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewCreateViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => false]; - } + return $object; } -} else { - class FormViewCreateViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => false]; } } diff --git a/generated/Normalizer/FormViewCreateViewNormalizer.php b/generated/Normalizer/FormViewCreateViewNormalizer.php index 2c0b56b..373dee8 100644 --- a/generated/Normalizer/FormViewCreateViewNormalizer.php +++ b/generated/Normalizer/FormViewCreateViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,345 +20,180 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { - $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class, 'json', $context)); - unset($data['cover_image']); - } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { - $object->setCoverImage(null); - } - if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { - $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class, 'json', $context)); - unset($data['logo_image']); - } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { - $object->setLogoImage(null); - } - if (\array_key_exists('submit_text', $data)) { - $object->setSubmitText($data['submit_text']); - unset($data['submit_text']); - } - if (\array_key_exists('submit_action', $data)) { - $object->setSubmitAction($data['submit_action']); - unset($data['submit_action']); - } - if (\array_key_exists('submit_action_message', $data)) { - $object->setSubmitActionMessage($data['submit_action_message']); - unset($data['submit_action_message']); - } - if (\array_key_exists('submit_action_redirect_url', $data)) { - $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); - unset($data['submit_action_redirect_url']); - } - if (\array_key_exists('receive_notification_on_submit', $data)) { - $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); - unset($data['receive_notification_on_submit']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('receive_notification_on_submit', $data) && \is_int($data['receive_notification_on_submit'])) { + $data['receive_notification_on_submit'] = (bool) $data['receive_notification_on_submit']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('coverImage') && null !== $object->getCoverImage()) { - $data['cover_image'] = $this->normalizer->normalize($object->getCoverImage(), 'json', $context); - } - if ($object->isInitialized('logoImage') && null !== $object->getLogoImage()) { - $data['logo_image'] = $this->normalizer->normalize($object->getLogoImage(), 'json', $context); - } - if ($object->isInitialized('submitText') && null !== $object->getSubmitText()) { - $data['submit_text'] = $object->getSubmitText(); - } - if ($object->isInitialized('submitAction') && null !== $object->getSubmitAction()) { - $data['submit_action'] = $object->getSubmitAction(); - } - if ($object->isInitialized('submitActionMessage') && null !== $object->getSubmitActionMessage()) { - $data['submit_action_message'] = $object->getSubmitActionMessage(); - } - if ($object->isInitialized('submitActionRedirectUrl') && null !== $object->getSubmitActionRedirectUrl()) { - $data['submit_action_redirect_url'] = $object->getSubmitActionRedirectUrl(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + unset($data['title']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + if (\array_key_exists('mode', $data)) { + $object->setMode($data['mode']); + unset($data['mode']); + } + if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { + $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class, 'json', $context)); + unset($data['cover_image']); + } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { + $object->setCoverImage(null); + } + if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { + $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class, 'json', $context)); + unset($data['logo_image']); + } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { + $object->setLogoImage(null); + } + if (\array_key_exists('submit_text', $data)) { + $object->setSubmitText($data['submit_text']); + unset($data['submit_text']); + } + if (\array_key_exists('submit_action', $data)) { + $object->setSubmitAction($data['submit_action']); + unset($data['submit_action']); + } + if (\array_key_exists('submit_action_message', $data)) { + $object->setSubmitActionMessage($data['submit_action_message']); + unset($data['submit_action_message']); + } + if (\array_key_exists('submit_action_redirect_url', $data)) { + $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); + unset($data['submit_action_redirect_url']); + } + if (\array_key_exists('receive_notification_on_submit', $data)) { + $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); + unset($data['receive_notification_on_submit']); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => false]; - } + return $object; } -} else { - class FormViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { - $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class, 'json', $context)); - unset($data['cover_image']); - } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { - $object->setCoverImage(null); - } - if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { - $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class, 'json', $context)); - unset($data['logo_image']); - } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { - $object->setLogoImage(null); - } - if (\array_key_exists('submit_text', $data)) { - $object->setSubmitText($data['submit_text']); - unset($data['submit_text']); - } - if (\array_key_exists('submit_action', $data)) { - $object->setSubmitAction($data['submit_action']); - unset($data['submit_action']); - } - if (\array_key_exists('submit_action_message', $data)) { - $object->setSubmitActionMessage($data['submit_action_message']); - unset($data['submit_action_message']); - } - if (\array_key_exists('submit_action_redirect_url', $data)) { - $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); - unset($data['submit_action_redirect_url']); - } - if (\array_key_exists('receive_notification_on_submit', $data)) { - $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); - unset($data['receive_notification_on_submit']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('coverImage') && null !== $object->getCoverImage()) { - $data['cover_image'] = $this->normalizer->normalize($object->getCoverImage(), 'json', $context); - } - if ($object->isInitialized('logoImage') && null !== $object->getLogoImage()) { - $data['logo_image'] = $this->normalizer->normalize($object->getLogoImage(), 'json', $context); - } - if ($object->isInitialized('submitText') && null !== $object->getSubmitText()) { - $data['submit_text'] = $object->getSubmitText(); - } - if ($object->isInitialized('submitAction') && null !== $object->getSubmitAction()) { - $data['submit_action'] = $object->getSubmitAction(); - } - if ($object->isInitialized('submitActionMessage') && null !== $object->getSubmitActionMessage()) { - $data['submit_action_message'] = $object->getSubmitActionMessage(); - } - if ($object->isInitialized('submitActionRedirectUrl') && null !== $object->getSubmitActionRedirectUrl()) { - $data['submit_action_redirect_url'] = $object->getSubmitActionRedirectUrl(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('title') && null !== $data->getTitle()) { + $dataArray['title'] = $data->getTitle(); + } + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); + } + if ($data->isInitialized('mode') && null !== $data->getMode()) { + $dataArray['mode'] = $data->getMode(); + } + if ($data->isInitialized('coverImage') && null !== $data->getCoverImage()) { + $dataArray['cover_image'] = $this->normalizer->normalize($data->getCoverImage(), 'json', $context); + } + if ($data->isInitialized('logoImage') && null !== $data->getLogoImage()) { + $dataArray['logo_image'] = $this->normalizer->normalize($data->getLogoImage(), 'json', $context); + } + if ($data->isInitialized('submitText') && null !== $data->getSubmitText()) { + $dataArray['submit_text'] = $data->getSubmitText(); + } + if ($data->isInitialized('submitAction') && null !== $data->getSubmitAction()) { + $dataArray['submit_action'] = $data->getSubmitAction(); + } + if ($data->isInitialized('submitActionMessage') && null !== $data->getSubmitActionMessage()) { + $dataArray['submit_action_message'] = $data->getSubmitActionMessage(); + } + if ($data->isInitialized('submitActionRedirectUrl') && null !== $data->getSubmitActionRedirectUrl()) { + $dataArray['submit_action_redirect_url'] = $data->getSubmitActionRedirectUrl(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => false]; } } diff --git a/generated/Normalizer/FormViewFieldOptionsConditionGroupNormalizer.php b/generated/Normalizer/FormViewFieldOptionsConditionGroupNormalizer.php index b843d43..1e96fc9 100644 --- a/generated/Normalizer/FormViewFieldOptionsConditionGroupNormalizer.php +++ b/generated/Normalizer/FormViewFieldOptionsConditionGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewFieldOptionsConditionGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewFieldOptionsConditionGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { - $object->setParentGroup($data['parent_group']); - unset($data['parent_group']); - } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { - $object->setParentGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('parentGroup') && null !== $object->getParentGroup()) { - $data['parent_group'] = $object->getParentGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { + $object->setParentGroup($data['parent_group']); + unset($data['parent_group']); + } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { + $object->setParentGroup(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => false]; - } + return $object; } -} else { - class FormViewFieldOptionsConditionGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class === get_class($data); + if ($data->isInitialized('parentGroup') && null !== $data->getParentGroup()) { + $dataArray['parent_group'] = $data->getParentGroup(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { - $object->setParentGroup($data['parent_group']); - unset($data['parent_group']); - } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { - $object->setParentGroup(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('parentGroup') && null !== $object->getParentGroup()) { - $data['parent_group'] = $object->getParentGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => false]; } } diff --git a/generated/Normalizer/FormViewFieldOptionsConditionNormalizer.php b/generated/Normalizer/FormViewFieldOptionsConditionNormalizer.php index 60ecfdf..ea91879 100644 --- a/generated/Normalizer/FormViewFieldOptionsConditionNormalizer.php +++ b/generated/Normalizer/FormViewFieldOptionsConditionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,181 +20,89 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewFieldOptionsConditionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewFieldOptionsConditionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $object->setGroup($data['group']); + unset($data['group']); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => false]; - } + return $object; } -} else { - class FormViewFieldOptionsConditionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['field'] = $data->getField(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class === get_class($data); + if ($data->isInitialized('group') && null !== $data->getGroup()) { + $dataArray['group'] = $data->getGroup(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => false]; } } diff --git a/generated/Normalizer/FormViewFieldOptionsNormalizer.php b/generated/Normalizer/FormViewFieldOptionsNormalizer.php index 77eed2d..f39deba 100644 --- a/generated/Normalizer/FormViewFieldOptionsNormalizer.php +++ b/generated/Normalizer/FormViewFieldOptionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class, 'json', $context); } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } + $object->setFieldOptions($values); + unset($data['field_options']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => false]; - } + return $object; } -} else { - class FormViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } + $dataArray['field_options'] = $values; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => false]; } } diff --git a/generated/Normalizer/FormViewSubmittedNormalizer.php b/generated/Normalizer/FormViewSubmittedNormalizer.php index 4b4d18f..79cf2a0 100644 --- a/generated/Normalizer/FormViewSubmittedNormalizer.php +++ b/generated/Normalizer/FormViewSubmittedNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewSubmittedNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewSubmittedNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewSubmitted(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('submit_action', $data)) { - $object->setSubmitAction($data['submit_action']); - unset($data['submit_action']); - } - if (\array_key_exists('submit_action_message', $data)) { - $object->setSubmitActionMessage($data['submit_action_message']); - unset($data['submit_action_message']); - } - if (\array_key_exists('submit_action_redirect_url', $data)) { - $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); - unset($data['submit_action_redirect_url']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewSubmitted(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('submitAction') && null !== $object->getSubmitAction()) { - $data['submit_action'] = $object->getSubmitAction(); - } - if ($object->isInitialized('submitActionMessage') && null !== $object->getSubmitActionMessage()) { - $data['submit_action_message'] = $object->getSubmitActionMessage(); - } - if ($object->isInitialized('submitActionRedirectUrl') && null !== $object->getSubmitActionRedirectUrl()) { - $data['submit_action_redirect_url'] = $object->getSubmitActionRedirectUrl(); - } - $data['row_id'] = $object->getRowId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('submit_action', $data)) { + $object->setSubmitAction($data['submit_action']); + unset($data['submit_action']); + } + if (\array_key_exists('submit_action_message', $data)) { + $object->setSubmitActionMessage($data['submit_action_message']); + unset($data['submit_action_message']); + } + if (\array_key_exists('submit_action_redirect_url', $data)) { + $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); + unset($data['submit_action_redirect_url']); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => false]; - } + return $object; } -} else { - class FormViewSubmittedNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('submitAction') && null !== $data->getSubmitAction()) { + $dataArray['submit_action'] = $data->getSubmitAction(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class === get_class($data); + if ($data->isInitialized('submitActionMessage') && null !== $data->getSubmitActionMessage()) { + $dataArray['submit_action_message'] = $data->getSubmitActionMessage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewSubmitted(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('submit_action', $data)) { - $object->setSubmitAction($data['submit_action']); - unset($data['submit_action']); - } - if (\array_key_exists('submit_action_message', $data)) { - $object->setSubmitActionMessage($data['submit_action_message']); - unset($data['submit_action_message']); - } - if (\array_key_exists('submit_action_redirect_url', $data)) { - $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); - unset($data['submit_action_redirect_url']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('submitActionRedirectUrl') && null !== $data->getSubmitActionRedirectUrl()) { + $dataArray['submit_action_redirect_url'] = $data->getSubmitActionRedirectUrl(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('submitAction') && null !== $object->getSubmitAction()) { - $data['submit_action'] = $object->getSubmitAction(); - } - if ($object->isInitialized('submitActionMessage') && null !== $object->getSubmitActionMessage()) { - $data['submit_action_message'] = $object->getSubmitActionMessage(); - } - if ($object->isInitialized('submitActionRedirectUrl') && null !== $object->getSubmitActionRedirectUrl()) { - $data['submit_action_redirect_url'] = $object->getSubmitActionRedirectUrl(); + $dataArray['row_id'] = $data->getRowId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - $data['row_id'] = $object->getRowId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => false]; } } diff --git a/generated/Normalizer/FormViewUpdateCoverImageNormalizer.php b/generated/Normalizer/FormViewUpdateCoverImageNormalizer.php index 0e9e3bd..2cb3ef4 100644 --- a/generated/Normalizer/FormViewUpdateCoverImageNormalizer.php +++ b/generated/Normalizer/FormViewUpdateCoverImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewUpdateCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewUpdateCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => false]; - } + return $object; } -} else { - class FormViewUpdateCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => false]; } } diff --git a/generated/Normalizer/FormViewUpdateLogoImageNormalizer.php b/generated/Normalizer/FormViewUpdateLogoImageNormalizer.php index 412e6cb..5af3ab7 100644 --- a/generated/Normalizer/FormViewUpdateLogoImageNormalizer.php +++ b/generated/Normalizer/FormViewUpdateLogoImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewUpdateLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewUpdateLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => false]; - } + return $object; } -} else { - class FormViewUpdateLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => false]; } } diff --git a/generated/Normalizer/FormViewUpdateNormalizer.php b/generated/Normalizer/FormViewUpdateNormalizer.php index f601430..3ae7172 100644 --- a/generated/Normalizer/FormViewUpdateNormalizer.php +++ b/generated/Normalizer/FormViewUpdateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,353 +20,184 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { - $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class, 'json', $context)); - unset($data['cover_image']); - } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { - $object->setCoverImage(null); - } - if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { - $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class, 'json', $context)); - unset($data['logo_image']); - } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { - $object->setLogoImage(null); - } - if (\array_key_exists('submit_text', $data)) { - $object->setSubmitText($data['submit_text']); - unset($data['submit_text']); - } - if (\array_key_exists('submit_action', $data)) { - $object->setSubmitAction($data['submit_action']); - unset($data['submit_action']); - } - if (\array_key_exists('submit_action_message', $data)) { - $object->setSubmitActionMessage($data['submit_action_message']); - unset($data['submit_action_message']); - } - if (\array_key_exists('submit_action_redirect_url', $data)) { - $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); - unset($data['submit_action_redirect_url']); - } - if (\array_key_exists('receive_notification_on_submit', $data)) { - $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); - unset($data['receive_notification_on_submit']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdate(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('receive_notification_on_submit', $data) && \is_int($data['receive_notification_on_submit'])) { + $data['receive_notification_on_submit'] = (bool) $data['receive_notification_on_submit']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('coverImage') && null !== $object->getCoverImage()) { - $data['cover_image'] = $this->normalizer->normalize($object->getCoverImage(), 'json', $context); - } - if ($object->isInitialized('logoImage') && null !== $object->getLogoImage()) { - $data['logo_image'] = $this->normalizer->normalize($object->getLogoImage(), 'json', $context); - } - if ($object->isInitialized('submitText') && null !== $object->getSubmitText()) { - $data['submit_text'] = $object->getSubmitText(); - } - if ($object->isInitialized('submitAction') && null !== $object->getSubmitAction()) { - $data['submit_action'] = $object->getSubmitAction(); - } - if ($object->isInitialized('submitActionMessage') && null !== $object->getSubmitActionMessage()) { - $data['submit_action_message'] = $object->getSubmitActionMessage(); - } - if ($object->isInitialized('submitActionRedirectUrl') && null !== $object->getSubmitActionRedirectUrl()) { - $data['submit_action_redirect_url'] = $object->getSubmitActionRedirectUrl(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_password', $data)) { + $object->setPublicViewPassword($data['public_view_password']); + unset($data['public_view_password']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + unset($data['title']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + if (\array_key_exists('mode', $data)) { + $object->setMode($data['mode']); + unset($data['mode']); + } + if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { + $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class, 'json', $context)); + unset($data['cover_image']); + } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { + $object->setCoverImage(null); + } + if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { + $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class, 'json', $context)); + unset($data['logo_image']); + } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { + $object->setLogoImage(null); + } + if (\array_key_exists('submit_text', $data)) { + $object->setSubmitText($data['submit_text']); + unset($data['submit_text']); + } + if (\array_key_exists('submit_action', $data)) { + $object->setSubmitAction($data['submit_action']); + unset($data['submit_action']); + } + if (\array_key_exists('submit_action_message', $data)) { + $object->setSubmitActionMessage($data['submit_action_message']); + unset($data['submit_action_message']); + } + if (\array_key_exists('submit_action_redirect_url', $data)) { + $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); + unset($data['submit_action_redirect_url']); + } + if (\array_key_exists('receive_notification_on_submit', $data)) { + $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); + unset($data['receive_notification_on_submit']); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => false]; - } + return $object; } -} else { - class FormViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { - $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class, 'json', $context)); - unset($data['cover_image']); - } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { - $object->setCoverImage(null); - } - if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { - $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class, 'json', $context)); - unset($data['logo_image']); - } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { - $object->setLogoImage(null); - } - if (\array_key_exists('submit_text', $data)) { - $object->setSubmitText($data['submit_text']); - unset($data['submit_text']); - } - if (\array_key_exists('submit_action', $data)) { - $object->setSubmitAction($data['submit_action']); - unset($data['submit_action']); - } - if (\array_key_exists('submit_action_message', $data)) { - $object->setSubmitActionMessage($data['submit_action_message']); - unset($data['submit_action_message']); - } - if (\array_key_exists('submit_action_redirect_url', $data)) { - $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); - unset($data['submit_action_redirect_url']); - } - if (\array_key_exists('receive_notification_on_submit', $data)) { - $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); - unset($data['receive_notification_on_submit']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('coverImage') && null !== $object->getCoverImage()) { - $data['cover_image'] = $this->normalizer->normalize($object->getCoverImage(), 'json', $context); - } - if ($object->isInitialized('logoImage') && null !== $object->getLogoImage()) { - $data['logo_image'] = $this->normalizer->normalize($object->getLogoImage(), 'json', $context); - } - if ($object->isInitialized('submitText') && null !== $object->getSubmitText()) { - $data['submit_text'] = $object->getSubmitText(); - } - if ($object->isInitialized('submitAction') && null !== $object->getSubmitAction()) { - $data['submit_action'] = $object->getSubmitAction(); - } - if ($object->isInitialized('submitActionMessage') && null !== $object->getSubmitActionMessage()) { - $data['submit_action_message'] = $object->getSubmitActionMessage(); - } - if ($object->isInitialized('submitActionRedirectUrl') && null !== $object->getSubmitActionRedirectUrl()) { - $data['submit_action_redirect_url'] = $object->getSubmitActionRedirectUrl(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('publicViewPassword') && null !== $data->getPublicViewPassword()) { + $dataArray['public_view_password'] = $data->getPublicViewPassword(); + } + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); + } + if ($data->isInitialized('title') && null !== $data->getTitle()) { + $dataArray['title'] = $data->getTitle(); + } + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); + } + if ($data->isInitialized('mode') && null !== $data->getMode()) { + $dataArray['mode'] = $data->getMode(); + } + if ($data->isInitialized('coverImage') && null !== $data->getCoverImage()) { + $dataArray['cover_image'] = $this->normalizer->normalize($data->getCoverImage(), 'json', $context); + } + if ($data->isInitialized('logoImage') && null !== $data->getLogoImage()) { + $dataArray['logo_image'] = $this->normalizer->normalize($data->getLogoImage(), 'json', $context); + } + if ($data->isInitialized('submitText') && null !== $data->getSubmitText()) { + $dataArray['submit_text'] = $data->getSubmitText(); + } + if ($data->isInitialized('submitAction') && null !== $data->getSubmitAction()) { + $dataArray['submit_action'] = $data->getSubmitAction(); + } + if ($data->isInitialized('submitActionMessage') && null !== $data->getSubmitActionMessage()) { + $dataArray['submit_action_message'] = $data->getSubmitActionMessage(); + } + if ($data->isInitialized('submitActionRedirectUrl') && null !== $data->getSubmitActionRedirectUrl()) { + $dataArray['submit_action_redirect_url'] = $data->getSubmitActionRedirectUrl(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => false]; } } diff --git a/generated/Normalizer/FormViewViewCoverImageNormalizer.php b/generated/Normalizer/FormViewViewCoverImageNormalizer.php index 5b9a1ef..ff9e12b 100644 --- a/generated/Normalizer/FormViewViewCoverImageNormalizer.php +++ b/generated/Normalizer/FormViewViewCoverImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => false]; - } + return $object; } -} else { - class FormViewViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => false]; } } diff --git a/generated/Normalizer/FormViewViewLogoImageNormalizer.php b/generated/Normalizer/FormViewViewLogoImageNormalizer.php index eea38b9..1a2fe24 100644 --- a/generated/Normalizer/FormViewViewLogoImageNormalizer.php +++ b/generated/Normalizer/FormViewViewLogoImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => false]; - } + return $object; } -} else { - class FormViewViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => false]; } } diff --git a/generated/Normalizer/FormViewViewNormalizer.php b/generated/Normalizer/FormViewViewNormalizer.php index d6d7420..895917b 100644 --- a/generated/Normalizer/FormViewViewNormalizer.php +++ b/generated/Normalizer/FormViewViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,561 +20,294 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormViewView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { - $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class, 'json', $context)); - unset($data['cover_image']); - } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { - $object->setCoverImage(null); - } - if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { - $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class, 'json', $context)); - unset($data['logo_image']); - } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { - $object->setLogoImage(null); - } - if (\array_key_exists('submit_text', $data)) { - $object->setSubmitText($data['submit_text']); - unset($data['submit_text']); - } - if (\array_key_exists('submit_action', $data)) { - $object->setSubmitAction($data['submit_action']); - unset($data['submit_action']); - } - if (\array_key_exists('submit_action_message', $data)) { - $object->setSubmitActionMessage($data['submit_action_message']); - unset($data['submit_action_message']); - } - if (\array_key_exists('submit_action_redirect_url', $data)) { - $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); - unset($data['submit_action_redirect_url']); - } - if (\array_key_exists('receive_notification_on_submit', $data)) { - $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); - unset($data['receive_notification_on_submit']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormViewView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public_view_has_password', $data) && \is_int($data['public_view_has_password'])) { + $data['public_view_has_password'] = (bool) $data['public_view_has_password']; + } + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (\array_key_exists('receive_notification_on_submit', $data) && \is_int($data['receive_notification_on_submit'])) { + $data['receive_notification_on_submit'] = (bool) $data['receive_notification_on_submit']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('coverImage') && null !== $object->getCoverImage()) { - $data['cover_image'] = $this->normalizer->normalize($object->getCoverImage(), 'json', $context); - } - if ($object->isInitialized('logoImage') && null !== $object->getLogoImage()) { - $data['logo_image'] = $this->normalizer->normalize($object->getLogoImage(), 'json', $context); - } - if ($object->isInitialized('submitText') && null !== $object->getSubmitText()) { - $data['submit_text'] = $object->getSubmitText(); - } - if ($object->isInitialized('submitAction') && null !== $object->getSubmitAction()) { - $data['submit_action'] = $object->getSubmitAction(); - } - if ($object->isInitialized('submitActionMessage') && null !== $object->getSubmitActionMessage()) { - $data['submit_action_message'] = $object->getSubmitActionMessage(); - } - if ($object->isInitialized('submitActionRedirectUrl') && null !== $object->getSubmitActionRedirectUrl()) { - $data['submit_action_redirect_url'] = $object->getSubmitActionRedirectUrl(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewView::class => false]; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - } -} else { - class FormViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormViewView::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormViewView::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { - $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class, 'json', $context)); - unset($data['cover_image']); - } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { - $object->setCoverImage(null); - } - if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { - $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class, 'json', $context)); - unset($data['logo_image']); - } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { - $object->setLogoImage(null); - } - if (\array_key_exists('submit_text', $data)) { - $object->setSubmitText($data['submit_text']); - unset($data['submit_text']); - } - if (\array_key_exists('submit_action', $data)) { - $object->setSubmitAction($data['submit_action']); - unset($data['submit_action']); - } - if (\array_key_exists('submit_action_message', $data)) { - $object->setSubmitActionMessage($data['submit_action_message']); - unset($data['submit_action_message']); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('table', $data)) { + $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); + unset($data['table']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); } - if (\array_key_exists('submit_action_redirect_url', $data)) { - $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); - unset($data['submit_action_redirect_url']); + $object->setFilters($values); + unset($data['filters']); + } + if (\array_key_exists('filter_groups', $data)) { + $values_1 = []; + foreach ($data['filter_groups'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); } - if (\array_key_exists('receive_notification_on_submit', $data)) { - $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); - unset($data['receive_notification_on_submit']); + $object->setFilterGroups($values_1); + unset($data['filter_groups']); + } + if (\array_key_exists('sortings', $data)) { + $values_2 = []; + foreach ($data['sortings'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); + $object->setSortings($values_2); + unset($data['sortings']); + } + if (\array_key_exists('group_bys', $data)) { + $values_3 = []; + foreach ($data['group_bys'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); + $object->setGroupBys($values_3); + unset($data['group_bys']); + } + if (\array_key_exists('decorations', $data)) { + $values_4 = []; + foreach ($data['decorations'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } + $object->setDecorations($values_4); + unset($data['decorations']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_has_password', $data)) { + $object->setPublicViewHasPassword($data['public_view_has_password']); + unset($data['public_view_has_password']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('owned_by_id', $data)) { + $object->setOwnedById($data['owned_by_id']); + unset($data['owned_by_id']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + unset($data['title']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + if (\array_key_exists('mode', $data)) { + $object->setMode($data['mode']); + unset($data['mode']); + } + if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { + $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class, 'json', $context)); + unset($data['cover_image']); + } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { + $object->setCoverImage(null); + } + if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { + $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class, 'json', $context)); + unset($data['logo_image']); + } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { + $object->setLogoImage(null); + } + if (\array_key_exists('submit_text', $data)) { + $object->setSubmitText($data['submit_text']); + unset($data['submit_text']); + } + if (\array_key_exists('submit_action', $data)) { + $object->setSubmitAction($data['submit_action']); + unset($data['submit_action']); + } + if (\array_key_exists('submit_action_message', $data)) { + $object->setSubmitActionMessage($data['submit_action_message']); + unset($data['submit_action_message']); + } + if (\array_key_exists('submit_action_redirect_url', $data)) { + $object->setSubmitActionRedirectUrl($data['submit_action_redirect_url']); + unset($data['submit_action_redirect_url']); + } + if (\array_key_exists('receive_notification_on_submit', $data)) { + $object->setReceiveNotificationOnSubmit($data['receive_notification_on_submit']); + unset($data['receive_notification_on_submit']); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_5; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('coverImage') && null !== $object->getCoverImage()) { - $data['cover_image'] = $this->normalizer->normalize($object->getCoverImage(), 'json', $context); - } - if ($object->isInitialized('logoImage') && null !== $object->getLogoImage()) { - $data['logo_image'] = $this->normalizer->normalize($object->getLogoImage(), 'json', $context); - } - if ($object->isInitialized('submitText') && null !== $object->getSubmitText()) { - $data['submit_text'] = $object->getSubmitText(); + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $dataArray['table'] = $this->normalizer->normalize($data->getTable(), 'json', $context); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('submitAction') && null !== $object->getSubmitAction()) { - $data['submit_action'] = $object->getSubmitAction(); + $dataArray['filters'] = $values; + } + if ($data->isInitialized('filterGroups') && null !== $data->getFilterGroups()) { + $values_1 = []; + foreach ($data->getFilterGroups() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - if ($object->isInitialized('submitActionMessage') && null !== $object->getSubmitActionMessage()) { - $data['submit_action_message'] = $object->getSubmitActionMessage(); + $dataArray['filter_groups'] = $values_1; + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values_2 = []; + foreach ($data->getSortings() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - if ($object->isInitialized('submitActionRedirectUrl') && null !== $object->getSubmitActionRedirectUrl()) { - $data['submit_action_redirect_url'] = $object->getSubmitActionRedirectUrl(); + $dataArray['sortings'] = $values_2; + } + if ($data->isInitialized('groupBys') && null !== $data->getGroupBys()) { + $values_3 = []; + foreach ($data->getGroupBys() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); + $dataArray['group_bys'] = $values_3; + } + if ($data->isInitialized('decorations') && null !== $data->getDecorations()) { + $values_4 = []; + foreach ($data->getDecorations() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } + $dataArray['decorations'] = $values_4; + } + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); + } + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); + } + $dataArray['ownership_type'] = $data->getOwnershipType(); + if ($data->isInitialized('ownedById') && null !== $data->getOwnedById()) { + $dataArray['owned_by_id'] = $data->getOwnedById(); + } + if ($data->isInitialized('title') && null !== $data->getTitle()) { + $dataArray['title'] = $data->getTitle(); + } + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); + } + if ($data->isInitialized('mode') && null !== $data->getMode()) { + $dataArray['mode'] = $data->getMode(); + } + if ($data->isInitialized('coverImage') && null !== $data->getCoverImage()) { + $dataArray['cover_image'] = $this->normalizer->normalize($data->getCoverImage(), 'json', $context); + } + if ($data->isInitialized('logoImage') && null !== $data->getLogoImage()) { + $dataArray['logo_image'] = $this->normalizer->normalize($data->getLogoImage(), 'json', $context); + } + if ($data->isInitialized('submitText') && null !== $data->getSubmitText()) { + $dataArray['submit_text'] = $data->getSubmitText(); + } + if ($data->isInitialized('submitAction') && null !== $data->getSubmitAction()) { + $dataArray['submit_action'] = $data->getSubmitAction(); + } + if ($data->isInitialized('submitActionMessage') && null !== $data->getSubmitActionMessage()) { + $dataArray['submit_action_message'] = $data->getSubmitActionMessage(); + } + if ($data->isInitialized('submitActionRedirectUrl') && null !== $data->getSubmitActionRedirectUrl()) { + $dataArray['submit_action_redirect_url'] = $data->getSubmitActionRedirectUrl(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_5; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormViewView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormViewView::class => false]; } } diff --git a/generated/Normalizer/FormulaFieldCreateFieldNormalizer.php b/generated/Normalizer/FormulaFieldCreateFieldNormalizer.php index 5b60c5e..5bebb7c 100644 --- a/generated/Normalizer/FormulaFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/FormulaFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,341 +20,178 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormulaFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormulaFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('formula', $data)) { + $object->setFormula($data['formula']); + unset($data['formula']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => false]; - } + return $object; } -} else { - class FormulaFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class === get_class($data); + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + $dataArray['formula'] = $data->getFormula(); + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/FormulaFieldFieldNormalizer.php b/generated/Normalizer/FormulaFieldFieldNormalizer.php index aa43d6a..0953899 100644 --- a/generated/Normalizer/FormulaFieldFieldNormalizer.php +++ b/generated/Normalizer/FormulaFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,387 +20,207 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormulaFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormulaFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('formula', $data)) { + $object->setFormula($data['formula']); + unset($data['formula']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => false]; - } + return $object; } -} else { - class FormulaFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + $dataArray['formula'] = $data->getFormula(); + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => false]; } } diff --git a/generated/Normalizer/FormulaFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/FormulaFieldFieldSerializerWithRelatedFieldsNormalizer.php index ddca6ba..2d74928 100644 --- a/generated/Normalizer/FormulaFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/FormulaFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,403 +20,215 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormulaFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormulaFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('formula', $data)) { + $object->setFormula($data['formula']); + unset($data['formula']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class FormulaFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + $dataArray['formula'] = $data->getFormula(); + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/FormulaFieldUpdateFieldNormalizer.php b/generated/Normalizer/FormulaFieldUpdateFieldNormalizer.php index ea330dd..278f88d 100644 --- a/generated/Normalizer/FormulaFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/FormulaFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,349 +20,182 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FormulaFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class FormulaFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data)) { + $object->setError($data['error']); + unset($data['error']); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('formula', $data)) { + $object->setFormula($data['formula']); + unset($data['formula']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => false]; - } + return $object; } -} else { - class FormulaFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data)) { - $object->setError($data['error']); - unset($data['error']); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + $dataArray['formula'] = $data->getFormula(); + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/FullHealthCheckNormalizer.php b/generated/Normalizer/FullHealthCheckNormalizer.php index a6172e8..25c9e66 100644 --- a/generated/Normalizer/FullHealthCheckNormalizer.php +++ b/generated/Normalizer/FullHealthCheckNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,143 +20,73 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class FullHealthCheckNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class === $type; - } +class FullHealthCheckNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class === get_class($data); - } + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool + { + return \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class === $type; + } - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FullHealthCheck(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('passing', $data)) { - $object->setPassing($data['passing']); - unset($data['passing']); - } - if (\array_key_exists('checks', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['checks'] as $key => $value) { - $values[$key] = $value; - } - $object->setChecks($values); - unset($data['checks']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class === get_class($data); + } - return $object; + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => false]; + $object = new \CedricZiel\Baserow\Generated\Model\FullHealthCheck(); + if (\array_key_exists('passing', $data) && \is_int($data['passing'])) { + $data['passing'] = (bool) $data['passing']; } - } -} else { - class FullHealthCheckNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class === $type; + if (null === $data || false === \is_array($data)) { + return $object; } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class === get_class($data); + if (\array_key_exists('passing', $data)) { + $object->setPassing($data['passing']); + unset($data['passing']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + if (\array_key_exists('checks', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['checks'] as $key => $value) { + $values[$key] = $value; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\FullHealthCheck(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('passing', $data)) { - $object->setPassing($data['passing']); - unset($data['passing']); - } - if (\array_key_exists('checks', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['checks'] as $key => $value) { - $values[$key] = $value; - } - $object->setChecks($values); - unset($data['checks']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } + $object->setChecks($values); + unset($data['checks']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => false]; } } diff --git a/generated/Normalizer/GalleryViewCreateViewNormalizer.php b/generated/Normalizer/GalleryViewCreateViewNormalizer.php index c268bf7..9330c4c 100644 --- a/generated/Normalizer/GalleryViewCreateViewNormalizer.php +++ b/generated/Normalizer/GalleryViewCreateViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,221 +20,115 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GalleryViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GalleryViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { + $object->setCardCoverImageField($data['card_cover_image_field']); + unset($data['card_cover_image_field']); + } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { + $object->setCardCoverImageField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => false]; - } + return $object; } -} else { - class GalleryViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('cardCoverImageField') && null !== $data->getCardCoverImageField()) { + $dataArray['card_cover_image_field'] = $data->getCardCoverImageField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => false]; } } diff --git a/generated/Normalizer/GalleryViewFieldOptionsNormalizer.php b/generated/Normalizer/GalleryViewFieldOptionsNormalizer.php index 7a813a5..e39463e 100644 --- a/generated/Normalizer/GalleryViewFieldOptionsNormalizer.php +++ b/generated/Normalizer/GalleryViewFieldOptionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GalleryViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GalleryViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } + $object->setFieldOptions($values); + unset($data['field_options']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => false]; - } + return $object; } -} else { - class GalleryViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } + $dataArray['field_options'] = $values; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => false]; } } diff --git a/generated/Normalizer/GalleryViewUpdateNormalizer.php b/generated/Normalizer/GalleryViewUpdateNormalizer.php index 2a8cacc..9e95e57 100644 --- a/generated/Normalizer/GalleryViewUpdateNormalizer.php +++ b/generated/Normalizer/GalleryViewUpdateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,229 +20,119 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GalleryViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GalleryViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_password', $data)) { + $object->setPublicViewPassword($data['public_view_password']); + unset($data['public_view_password']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { + $object->setCardCoverImageField($data['card_cover_image_field']); + unset($data['card_cover_image_field']); + } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { + $object->setCardCoverImageField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => false]; - } + return $object; } -} else { - class GalleryViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('publicViewPassword') && null !== $data->getPublicViewPassword()) { + $dataArray['public_view_password'] = $data->getPublicViewPassword(); + } + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); + } + if ($data->isInitialized('cardCoverImageField') && null !== $data->getCardCoverImageField()) { + $dataArray['card_cover_image_field'] = $data->getCardCoverImageField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => false]; } } diff --git a/generated/Normalizer/GalleryViewViewNormalizer.php b/generated/Normalizer/GalleryViewViewNormalizer.php index 87cbc5c..170b62b 100644 --- a/generated/Normalizer/GalleryViewViewNormalizer.php +++ b/generated/Normalizer/GalleryViewViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,437 +20,229 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GalleryViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GalleryViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GalleryViewView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GalleryViewView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public_view_has_password', $data) && \is_int($data['public_view_has_password'])) { + $data['public_view_has_password'] = (bool) $data['public_view_has_password']; + } + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GalleryViewView::class => false]; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - } -} else { - class GalleryViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GalleryViewView::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GalleryViewView::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GalleryViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('table', $data)) { + $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); + unset($data['table']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); + $object->setFilters($values); + unset($data['filters']); + } + if (\array_key_exists('filter_groups', $data)) { + $values_1 = []; + foreach ($data['filter_groups'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); + $object->setFilterGroups($values_1); + unset($data['filter_groups']); + } + if (\array_key_exists('sortings', $data)) { + $values_2 = []; + foreach ($data['sortings'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); + $object->setSortings($values_2); + unset($data['sortings']); + } + if (\array_key_exists('group_bys', $data)) { + $values_3 = []; + foreach ($data['group_bys'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); + $object->setGroupBys($values_3); + unset($data['group_bys']); + } + if (\array_key_exists('decorations', $data)) { + $values_4 = []; + foreach ($data['decorations'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } + $object->setDecorations($values_4); + unset($data['decorations']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_has_password', $data)) { + $object->setPublicViewHasPassword($data['public_view_has_password']); + unset($data['public_view_has_password']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('owned_by_id', $data)) { + $object->setOwnedById($data['owned_by_id']); + unset($data['owned_by_id']); + } + if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { + $object->setCardCoverImageField($data['card_cover_image_field']); + unset($data['card_cover_image_field']); + } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { + $object->setCardCoverImageField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_5; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $dataArray['table'] = $this->normalizer->normalize($data->getTable(), 'json', $context); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); + $dataArray['filters'] = $values; + } + if ($data->isInitialized('filterGroups') && null !== $data->getFilterGroups()) { + $values_1 = []; + foreach ($data->getFilterGroups() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); + $dataArray['filter_groups'] = $values_1; + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values_2 = []; + foreach ($data->getSortings() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); + $dataArray['sortings'] = $values_2; + } + if ($data->isInitialized('groupBys') && null !== $data->getGroupBys()) { + $values_3 = []; + foreach ($data->getGroupBys() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); + $dataArray['group_bys'] = $values_3; + } + if ($data->isInitialized('decorations') && null !== $data->getDecorations()) { + $values_4 = []; + foreach ($data->getDecorations() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } + $dataArray['decorations'] = $values_4; + } + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); + } + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); + } + $dataArray['ownership_type'] = $data->getOwnershipType(); + if ($data->isInitialized('ownedById') && null !== $data->getOwnedById()) { + $dataArray['owned_by_id'] = $data->getOwnedById(); + } + if ($data->isInitialized('cardCoverImageField') && null !== $data->getCardCoverImageField()) { + $dataArray['card_cover_image_field'] = $data->getCardCoverImageField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_5; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GalleryViewView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GalleryViewView::class => false]; } } diff --git a/generated/Normalizer/GenerateFormulaWithAIRequestNormalizer.php b/generated/Normalizer/GenerateFormulaWithAIRequestNormalizer.php index a41ea71..3bf5a06 100644 --- a/generated/Normalizer/GenerateFormulaWithAIRequestNormalizer.php +++ b/generated/Normalizer/GenerateFormulaWithAIRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,149 +20,73 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GenerateFormulaWithAIRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GenerateFormulaWithAIRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('ai_type', $data)) { - $object->setAiType($data['ai_type']); - unset($data['ai_type']); - } - if (\array_key_exists('ai_model', $data)) { - $object->setAiModel($data['ai_model']); - unset($data['ai_model']); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['ai_type'] = $object->getAiType(); - $data['ai_model'] = $object->getAiModel(); - $data['ai_prompt'] = $object->getAiPrompt(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => false]; + if (\array_key_exists('ai_type', $data)) { + $object->setAiType($data['ai_type']); + unset($data['ai_type']); } - } -} else { - class GenerateFormulaWithAIRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class === $type; + if (\array_key_exists('ai_model', $data)) { + $object->setAiModel($data['ai_model']); + unset($data['ai_model']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class === get_class($data); + if (\array_key_exists('ai_prompt', $data)) { + $object->setAiPrompt($data['ai_prompt']); + unset($data['ai_prompt']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('ai_type', $data)) { - $object->setAiType($data['ai_type']); - unset($data['ai_type']); - } - if (\array_key_exists('ai_model', $data)) { - $object->setAiModel($data['ai_model']); - unset($data['ai_model']); - } - if (\array_key_exists('ai_prompt', $data)) { - $object->setAiPrompt($data['ai_prompt']); - unset($data['ai_prompt']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['ai_type'] = $object->getAiType(); - $data['ai_model'] = $object->getAiModel(); - $data['ai_prompt'] = $object->getAiPrompt(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['ai_type'] = $data->getAiType(); + $dataArray['ai_model'] = $data->getAiModel(); + $dataArray['ai_prompt'] = $data->getAiPrompt(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => false]; } } diff --git a/generated/Normalizer/GenerateFormulaWithAIResponseNormalizer.php b/generated/Normalizer/GenerateFormulaWithAIResponseNormalizer.php index 6cf41f3..5efbe48 100644 --- a/generated/Normalizer/GenerateFormulaWithAIResponseNormalizer.php +++ b/generated/Normalizer/GenerateFormulaWithAIResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GenerateFormulaWithAIResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GenerateFormulaWithAIResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['formula'] = $object->getFormula(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('formula', $data)) { + $object->setFormula($data['formula']); + unset($data['formula']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => false]; - } + return $object; } -} else { - class GenerateFormulaWithAIResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['formula'] = $data->getFormula(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['formula'] = $object->getFormula(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => false]; } } diff --git a/generated/Normalizer/GeneratedConditionalColorCreateViewDecorationNormalizer.php b/generated/Normalizer/GeneratedConditionalColorCreateViewDecorationNormalizer.php index 980ad59..559869c 100644 --- a/generated/Normalizer/GeneratedConditionalColorCreateViewDecorationNormalizer.php +++ b/generated/Normalizer/GeneratedConditionalColorCreateViewDecorationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedConditionalColorCreateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedConditionalColorCreateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value_provider_type', $data)) { + $object->setValueProviderType($data['value_provider_type']); + unset($data['value_provider_type']); + } + if (\array_key_exists('value_provider_conf', $data)) { + $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class, 'json', $context)); + unset($data['value_provider_conf']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => false]; - } + return $object; } -} else { - class GeneratedConditionalColorCreateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('valueProviderType') && null !== $data->getValueProviderType()) { + $dataArray['value_provider_type'] = $data->getValueProviderType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class === get_class($data); + if ($data->isInitialized('valueProviderConf') && null !== $data->getValueProviderConf()) { + $dataArray['value_provider_conf'] = $this->normalizer->normalize($data->getValueProviderConf(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => false]; } } diff --git a/generated/Normalizer/GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer.php b/generated/Normalizer/GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer.php index 079f959..ea7c31e 100644 --- a/generated/Normalizer/GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer.php +++ b/generated/Normalizer/GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('colors', $data)) { - $values = []; - foreach ($data['colors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); - } - $object->setColors($values); - unset($data['colors']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('colors', $data)) { $values = []; - foreach ($object->getColors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['colors'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); } - $data['colors'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setColors($values); + unset($data['colors']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => false]; - } + return $object; } -} else { - class GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getColors() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['colors'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('colors', $data)) { - $values = []; - foreach ($data['colors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); - } - $object->setColors($values); - unset($data['colors']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getColors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['colors'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => false]; } } diff --git a/generated/Normalizer/GeneratedConditionalColorUpdateViewDecorationNormalizer.php b/generated/Normalizer/GeneratedConditionalColorUpdateViewDecorationNormalizer.php index 48209a8..39b3067 100644 --- a/generated/Normalizer/GeneratedConditionalColorUpdateViewDecorationNormalizer.php +++ b/generated/Normalizer/GeneratedConditionalColorUpdateViewDecorationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedConditionalColorUpdateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedConditionalColorUpdateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value_provider_type', $data)) { + $object->setValueProviderType($data['value_provider_type']); + unset($data['value_provider_type']); + } + if (\array_key_exists('value_provider_conf', $data)) { + $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class, 'json', $context)); + unset($data['value_provider_conf']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => false]; - } + return $object; } -} else { - class GeneratedConditionalColorUpdateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class === get_class($data); + if ($data->isInitialized('valueProviderType') && null !== $data->getValueProviderType()) { + $dataArray['value_provider_type'] = $data->getValueProviderType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('valueProviderConf') && null !== $data->getValueProviderConf()) { + $dataArray['value_provider_conf'] = $this->normalizer->normalize($data->getValueProviderConf(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => false]; } } diff --git a/generated/Normalizer/GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer.php b/generated/Normalizer/GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer.php index 108d99b..49f4bce 100644 --- a/generated/Normalizer/GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer.php +++ b/generated/Normalizer/GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('colors', $data)) { - $values = []; - foreach ($data['colors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); - } - $object->setColors($values); - unset($data['colors']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('colors', $data)) { $values = []; - foreach ($object->getColors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['colors'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); } - $data['colors'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setColors($values); + unset($data['colors']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => false]; - } + return $object; } -} else { - class GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getColors() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['colors'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('colors', $data)) { - $values = []; - foreach ($data['colors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); - } - $object->setColors($values); - unset($data['colors']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getColors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['colors'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => false]; } } diff --git a/generated/Normalizer/GeneratedConditionalColorViewDecorationNormalizer.php b/generated/Normalizer/GeneratedConditionalColorViewDecorationNormalizer.php index d460a92..74ebd89 100644 --- a/generated/Normalizer/GeneratedConditionalColorViewDecorationNormalizer.php +++ b/generated/Normalizer/GeneratedConditionalColorViewDecorationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,197 +20,97 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedConditionalColorViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedConditionalColorViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value_provider_type', $data)) { + $object->setValueProviderType($data['value_provider_type']); + unset($data['value_provider_type']); + } + if (\array_key_exists('value_provider_conf', $data)) { + $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class, 'json', $context)); + unset($data['value_provider_conf']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => false]; - } + return $object; } -} else { - class GeneratedConditionalColorViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('view') && null !== $data->getView()) { + $dataArray['view'] = $data->getView(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('valueProviderType') && null !== $data->getValueProviderType()) { + $dataArray['value_provider_type'] = $data->getValueProviderType(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('valueProviderConf') && null !== $data->getValueProviderConf()) { + $dataArray['value_provider_conf'] = $this->normalizer->normalize($data->getValueProviderConf(), 'json', $context); + } + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => false]; } } diff --git a/generated/Normalizer/GeneratedConditionalColorViewDecorationValueProviderConfNormalizer.php b/generated/Normalizer/GeneratedConditionalColorViewDecorationValueProviderConfNormalizer.php index 91a52e8..8622588 100644 --- a/generated/Normalizer/GeneratedConditionalColorViewDecorationValueProviderConfNormalizer.php +++ b/generated/Normalizer/GeneratedConditionalColorViewDecorationValueProviderConfNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedConditionalColorViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedConditionalColorViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('colors', $data)) { - $values = []; - foreach ($data['colors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); - } - $object->setColors($values); - unset($data['colors']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('colors', $data)) { $values = []; - foreach ($object->getColors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['colors'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); } - $data['colors'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setColors($values); + unset($data['colors']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => false]; - } + return $object; } -} else { - class GeneratedConditionalColorViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getColors() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['colors'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('colors', $data)) { - $values = []; - foreach ($data['colors'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class, 'json', $context); - } - $object->setColors($values); - unset($data['colors']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getColors() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['colors'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => false]; } } diff --git a/generated/Normalizer/GeneratedSingleSelectColorCreateViewDecorationNormalizer.php b/generated/Normalizer/GeneratedSingleSelectColorCreateViewDecorationNormalizer.php index e3d5d6c..44df98a 100644 --- a/generated/Normalizer/GeneratedSingleSelectColorCreateViewDecorationNormalizer.php +++ b/generated/Normalizer/GeneratedSingleSelectColorCreateViewDecorationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedSingleSelectColorCreateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedSingleSelectColorCreateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value_provider_type', $data)) { + $object->setValueProviderType($data['value_provider_type']); + unset($data['value_provider_type']); + } + if (\array_key_exists('value_provider_conf', $data)) { + $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class, 'json', $context)); + unset($data['value_provider_conf']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => false]; - } + return $object; } -} else { - class GeneratedSingleSelectColorCreateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('valueProviderType') && null !== $data->getValueProviderType()) { + $dataArray['value_provider_type'] = $data->getValueProviderType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class === get_class($data); + if ($data->isInitialized('valueProviderConf') && null !== $data->getValueProviderConf()) { + $dataArray['value_provider_conf'] = $this->normalizer->normalize($data->getValueProviderConf(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => false]; } } diff --git a/generated/Normalizer/GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer.php b/generated/Normalizer/GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer.php index aef4ee9..5b613b6 100644 --- a/generated/Normalizer/GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer.php +++ b/generated/Normalizer/GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { - $object->setFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field_id'] = $object->getFieldId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { + $object->setFieldId($data['field_id']); + unset($data['field_id']); + } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { + $object->setFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => false]; - } + return $object; } -} else { - class GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { - $object->setFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field_id'] = $data->getFieldId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field_id'] = $object->getFieldId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => false]; } } diff --git a/generated/Normalizer/GeneratedSingleSelectColorUpdateViewDecorationNormalizer.php b/generated/Normalizer/GeneratedSingleSelectColorUpdateViewDecorationNormalizer.php index f8707f0..3851665 100644 --- a/generated/Normalizer/GeneratedSingleSelectColorUpdateViewDecorationNormalizer.php +++ b/generated/Normalizer/GeneratedSingleSelectColorUpdateViewDecorationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedSingleSelectColorUpdateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedSingleSelectColorUpdateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value_provider_type', $data)) { + $object->setValueProviderType($data['value_provider_type']); + unset($data['value_provider_type']); + } + if (\array_key_exists('value_provider_conf', $data)) { + $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class, 'json', $context)); + unset($data['value_provider_conf']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => false]; - } + return $object; } -} else { - class GeneratedSingleSelectColorUpdateViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class === get_class($data); + if ($data->isInitialized('valueProviderType') && null !== $data->getValueProviderType()) { + $dataArray['value_provider_type'] = $data->getValueProviderType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('valueProviderConf') && null !== $data->getValueProviderConf()) { + $dataArray['value_provider_conf'] = $this->normalizer->normalize($data->getValueProviderConf(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => false]; } } diff --git a/generated/Normalizer/GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer.php b/generated/Normalizer/GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer.php index a96bedf..a729bd2 100644 --- a/generated/Normalizer/GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer.php +++ b/generated/Normalizer/GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { - $object->setFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field_id'] = $object->getFieldId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { + $object->setFieldId($data['field_id']); + unset($data['field_id']); + } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { + $object->setFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => false]; - } + return $object; } -} else { - class GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { - $object->setFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field_id'] = $data->getFieldId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field_id'] = $object->getFieldId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => false]; } } diff --git a/generated/Normalizer/GeneratedSingleSelectColorViewDecorationNormalizer.php b/generated/Normalizer/GeneratedSingleSelectColorViewDecorationNormalizer.php index 744249b..79af14d 100644 --- a/generated/Normalizer/GeneratedSingleSelectColorViewDecorationNormalizer.php +++ b/generated/Normalizer/GeneratedSingleSelectColorViewDecorationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,197 +20,97 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedSingleSelectColorViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedSingleSelectColorViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value_provider_type', $data)) { + $object->setValueProviderType($data['value_provider_type']); + unset($data['value_provider_type']); + } + if (\array_key_exists('value_provider_conf', $data)) { + $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class, 'json', $context)); + unset($data['value_provider_conf']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => false]; - } + return $object; } -} else { - class GeneratedSingleSelectColorViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('view') && null !== $data->getView()) { + $dataArray['view'] = $data->getView(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($this->denormalizer->denormalize($data['value_provider_conf'], \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class, 'json', $context)); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('valueProviderType') && null !== $data->getValueProviderType()) { + $dataArray['value_provider_type'] = $data->getValueProviderType(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $this->normalizer->normalize($object->getValueProviderConf(), 'json', $context); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('valueProviderConf') && null !== $data->getValueProviderConf()) { + $dataArray['value_provider_conf'] = $this->normalizer->normalize($data->getValueProviderConf(), 'json', $context); + } + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => false]; } } diff --git a/generated/Normalizer/GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer.php b/generated/Normalizer/GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer.php index 2a47382..a5246f1 100644 --- a/generated/Normalizer/GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer.php +++ b/generated/Normalizer/GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { - $object->setFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field_id'] = $object->getFieldId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { + $object->setFieldId($data['field_id']); + unset($data['field_id']); + } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { + $object->setFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => false]; - } + return $object; } -} else { - class GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { - $object->setFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field_id'] = $data->getFieldId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field_id'] = $object->getFieldId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => false]; } } diff --git a/generated/Normalizer/GenerativeAISettingsNormalizer.php b/generated/Normalizer/GenerativeAISettingsNormalizer.php index 9eacd30..7c5c511 100644 --- a/generated/Normalizer/GenerativeAISettingsNormalizer.php +++ b/generated/Normalizer/GenerativeAISettingsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GenerativeAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GenerativeAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GenerativeAISettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('openai', $data)) { - $object->setOpenai($this->denormalizer->denormalize($data['openai'], \CedricZiel\Baserow\Generated\Model\OpenAISettings::class, 'json', $context)); - unset($data['openai']); - } - if (\array_key_exists('ollama', $data)) { - $object->setOllama($this->denormalizer->denormalize($data['ollama'], \CedricZiel\Baserow\Generated\Model\OllamaSettings::class, 'json', $context)); - unset($data['ollama']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GenerativeAISettings(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('openai') && null !== $object->getOpenai()) { - $data['openai'] = $this->normalizer->normalize($object->getOpenai(), 'json', $context); - } - if ($object->isInitialized('ollama') && null !== $object->getOllama()) { - $data['ollama'] = $this->normalizer->normalize($object->getOllama(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('openai', $data)) { + $object->setOpenai($this->denormalizer->denormalize($data['openai'], \CedricZiel\Baserow\Generated\Model\OpenAISettings::class, 'json', $context)); + unset($data['openai']); + } + if (\array_key_exists('ollama', $data)) { + $object->setOllama($this->denormalizer->denormalize($data['ollama'], \CedricZiel\Baserow\Generated\Model\OllamaSettings::class, 'json', $context)); + unset($data['ollama']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => false]; - } + return $object; } -} else { - class GenerativeAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('openai') && null !== $data->getOpenai()) { + $dataArray['openai'] = $this->normalizer->normalize($data->getOpenai(), 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class === get_class($data); + if ($data->isInitialized('ollama') && null !== $data->getOllama()) { + $dataArray['ollama'] = $this->normalizer->normalize($data->getOllama(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GenerativeAISettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('openai', $data)) { - $object->setOpenai($this->denormalizer->denormalize($data['openai'], \CedricZiel\Baserow\Generated\Model\OpenAISettings::class, 'json', $context)); - unset($data['openai']); - } - if (\array_key_exists('ollama', $data)) { - $object->setOllama($this->denormalizer->denormalize($data['ollama'], \CedricZiel\Baserow\Generated\Model\OllamaSettings::class, 'json', $context)); - unset($data['ollama']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('openai') && null !== $object->getOpenai()) { - $data['openai'] = $this->normalizer->normalize($object->getOpenai(), 'json', $context); - } - if ($object->isInitialized('ollama') && null !== $object->getOllama()) { - $data['ollama'] = $this->normalizer->normalize($object->getOllama(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => false]; } } diff --git a/generated/Normalizer/GitHubAuthProviderModelAuthProviderNormalizer.php b/generated/Normalizer/GitHubAuthProviderModelAuthProviderNormalizer.php index 9eec4f5..5377741 100644 --- a/generated/Normalizer/GitHubAuthProviderModelAuthProviderNormalizer.php +++ b/generated/Normalizer/GitHubAuthProviderModelAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,197 +20,100 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GitHubAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GitHubAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider(); + if (\array_key_exists('enabled', $data) && \is_int($data['enabled'])) { + $data['enabled'] = (bool) $data['enabled']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + unset($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('enabled', $data)) { + $object->setEnabled($data['enabled']); + unset($data['enabled']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('client_id', $data)) { + $object->setClientId($data['client_id']); + unset($data['client_id']); + } + if (\array_key_exists('secret', $data)) { + $object->setSecret($data['secret']); + unset($data['secret']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => false]; - } + return $object; } -} else { - class GitHubAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('domain') && null !== $data->getDomain()) { + $dataArray['domain'] = $data->getDomain(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class === get_class($data); + if ($data->isInitialized('enabled') && null !== $data->getEnabled()) { + $dataArray['enabled'] = $data->getEnabled(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); + $dataArray['name'] = $data->getName(); + $dataArray['client_id'] = $data->getClientId(); + $dataArray['secret'] = $data->getSecret(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => false]; } } diff --git a/generated/Normalizer/GitLabAuthProviderModelAuthProviderNormalizer.php b/generated/Normalizer/GitLabAuthProviderModelAuthProviderNormalizer.php index eadfaa0..038dc63 100644 --- a/generated/Normalizer/GitLabAuthProviderModelAuthProviderNormalizer.php +++ b/generated/Normalizer/GitLabAuthProviderModelAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,207 +20,105 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GitLabAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GitLabAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('base_url', $data)) { - $object->setBaseUrl($data['base_url']); - unset($data['base_url']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider(); + if (\array_key_exists('enabled', $data) && \is_int($data['enabled'])) { + $data['enabled'] = (bool) $data['enabled']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['base_url'] = $object->getBaseUrl(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + unset($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('enabled', $data)) { + $object->setEnabled($data['enabled']); + unset($data['enabled']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('base_url', $data)) { + $object->setBaseUrl($data['base_url']); + unset($data['base_url']); + } + if (\array_key_exists('client_id', $data)) { + $object->setClientId($data['client_id']); + unset($data['client_id']); + } + if (\array_key_exists('secret', $data)) { + $object->setSecret($data['secret']); + unset($data['secret']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => false]; - } + return $object; } -} else { - class GitLabAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('domain') && null !== $data->getDomain()) { + $dataArray['domain'] = $data->getDomain(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class === get_class($data); + if ($data->isInitialized('enabled') && null !== $data->getEnabled()) { + $dataArray['enabled'] = $data->getEnabled(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); + $dataArray['name'] = $data->getName(); + $dataArray['base_url'] = $data->getBaseUrl(); + $dataArray['client_id'] = $data->getClientId(); + $dataArray['secret'] = $data->getSecret(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('base_url', $data)) { - $object->setBaseUrl($data['base_url']); - unset($data['base_url']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['base_url'] = $object->getBaseUrl(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => false]; } } diff --git a/generated/Normalizer/GoogleAuthProviderModelAuthProviderNormalizer.php b/generated/Normalizer/GoogleAuthProviderModelAuthProviderNormalizer.php index 4c65a41..913cac3 100644 --- a/generated/Normalizer/GoogleAuthProviderModelAuthProviderNormalizer.php +++ b/generated/Normalizer/GoogleAuthProviderModelAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,197 +20,100 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GoogleAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GoogleAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider(); + if (\array_key_exists('enabled', $data) && \is_int($data['enabled'])) { + $data['enabled'] = (bool) $data['enabled']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + unset($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('enabled', $data)) { + $object->setEnabled($data['enabled']); + unset($data['enabled']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('client_id', $data)) { + $object->setClientId($data['client_id']); + unset($data['client_id']); + } + if (\array_key_exists('secret', $data)) { + $object->setSecret($data['secret']); + unset($data['secret']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => false]; - } + return $object; } -} else { - class GoogleAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('domain') && null !== $data->getDomain()) { + $dataArray['domain'] = $data->getDomain(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class === get_class($data); + if ($data->isInitialized('enabled') && null !== $data->getEnabled()) { + $dataArray['enabled'] = $data->getEnabled(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); + $dataArray['name'] = $data->getName(); + $dataArray['client_id'] = $data->getClientId(); + $dataArray['secret'] = $data->getSecret(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => false]; } } diff --git a/generated/Normalizer/GridViewCreateViewNormalizer.php b/generated/Normalizer/GridViewCreateViewNormalizer.php index b49a662..0ae8081 100644 --- a/generated/Normalizer/GridViewCreateViewNormalizer.php +++ b/generated/Normalizer/GridViewCreateViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,217 +20,113 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GridViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GridViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('row_identifier_type', $data)) { - $object->setRowIdentifierType($data['row_identifier_type']); - unset($data['row_identifier_type']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GridViewCreateView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('rowIdentifierType') && null !== $object->getRowIdentifierType()) { - $data['row_identifier_type'] = $object->getRowIdentifierType(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('row_identifier_type', $data)) { + $object->setRowIdentifierType($data['row_identifier_type']); + unset($data['row_identifier_type']); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => false]; - } + return $object; } -} else { - class GridViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('row_identifier_type', $data)) { - $object->setRowIdentifierType($data['row_identifier_type']); - unset($data['row_identifier_type']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('rowIdentifierType') && null !== $object->getRowIdentifierType()) { - $data['row_identifier_type'] = $object->getRowIdentifierType(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('rowIdentifierType') && null !== $data->getRowIdentifierType()) { + $dataArray['row_identifier_type'] = $data->getRowIdentifierType(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => false]; } } diff --git a/generated/Normalizer/GridViewFieldOptionsNormalizer.php b/generated/Normalizer/GridViewFieldOptionsNormalizer.php index 4569e28..3345af3 100644 --- a/generated/Normalizer/GridViewFieldOptionsNormalizer.php +++ b/generated/Normalizer/GridViewFieldOptionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GridViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GridViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } + $object->setFieldOptions($values); + unset($data['field_options']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => false]; - } + return $object; } -} else { - class GridViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } + $dataArray['field_options'] = $values; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => false]; } } diff --git a/generated/Normalizer/GridViewFilterNormalizer.php b/generated/Normalizer/GridViewFilterNormalizer.php index bd1d6f0..92f1a13 100644 --- a/generated/Normalizer/GridViewFilterNormalizer.php +++ b/generated/Normalizer/GridViewFilterNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GridViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GridViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GridViewFilter::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewFilter::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewFilter::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewFilter::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_ids', $data)) { - $values = []; - foreach ($data['field_ids'] as $value) { - $values[] = $value; - } - $object->setFieldIds($values); - unset($data['field_ids']); - } - if (\array_key_exists('row_ids', $data)) { - $values_1 = []; - foreach ($data['row_ids'] as $value_1) { - $values_1[] = $value_1; - } - $object->setRowIds($values_1); - unset($data['row_ids']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GridViewFilter(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('fieldIds') && null !== $object->getFieldIds()) { - $values = []; - foreach ($object->getFieldIds() as $value) { - $values[] = $value; - } - $data['field_ids'] = $values; + if (\array_key_exists('field_ids', $data)) { + $values = []; + foreach ($data['field_ids'] as $value) { + $values[] = $value; } + $object->setFieldIds($values); + unset($data['field_ids']); + } + if (\array_key_exists('row_ids', $data)) { $values_1 = []; - foreach ($object->getRowIds() as $value_1) { + foreach ($data['row_ids'] as $value_1) { $values_1[] = $value_1; } - $data['row_ids'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setRowIds($values_1); + unset($data['row_ids']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewFilter::class => false]; - } + return $object; } -} else { - class GridViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewFilter::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('fieldIds') && null !== $data->getFieldIds()) { + $values = []; + foreach ($data->getFieldIds() as $value) { + $values[] = $value; + } + $dataArray['field_ids'] = $values; } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewFilter::class === get_class($data); + $values_1 = []; + foreach ($data->getRowIds() as $value_1) { + $values_1[] = $value_1; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewFilter(); - if (null === $data || false === \is_array($data)) { - return $object; + $dataArray['row_ids'] = $values_1; + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - if (\array_key_exists('field_ids', $data)) { - $values = []; - foreach ($data['field_ids'] as $value) { - $values[] = $value; - } - $object->setFieldIds($values); - unset($data['field_ids']); - } - if (\array_key_exists('row_ids', $data)) { - $values_1 = []; - foreach ($data['row_ids'] as $value_1) { - $values_1[] = $value_1; - } - $object->setRowIds($values_1); - unset($data['row_ids']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('fieldIds') && null !== $object->getFieldIds()) { - $values = []; - foreach ($object->getFieldIds() as $value) { - $values[] = $value; - } - $data['field_ids'] = $values; - } - $values_1 = []; - foreach ($object->getRowIds() as $value_1) { - $values_1[] = $value_1; - } - $data['row_ids'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewFilter::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GridViewFilter::class => false]; } } diff --git a/generated/Normalizer/GridViewUpdateNormalizer.php b/generated/Normalizer/GridViewUpdateNormalizer.php index 491af51..a5270af 100644 --- a/generated/Normalizer/GridViewUpdateNormalizer.php +++ b/generated/Normalizer/GridViewUpdateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,225 +20,117 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GridViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GridViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('row_identifier_type', $data)) { - $object->setRowIdentifierType($data['row_identifier_type']); - unset($data['row_identifier_type']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GridViewUpdate(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('rowIdentifierType') && null !== $object->getRowIdentifierType()) { - $data['row_identifier_type'] = $object->getRowIdentifierType(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_password', $data)) { + $object->setPublicViewPassword($data['public_view_password']); + unset($data['public_view_password']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('row_identifier_type', $data)) { + $object->setRowIdentifierType($data['row_identifier_type']); + unset($data['row_identifier_type']); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => false]; - } + return $object; } -} else { - class GridViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('row_identifier_type', $data)) { - $object->setRowIdentifierType($data['row_identifier_type']); - unset($data['row_identifier_type']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('rowIdentifierType') && null !== $object->getRowIdentifierType()) { - $data['row_identifier_type'] = $object->getRowIdentifierType(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('publicViewPassword') && null !== $data->getPublicViewPassword()) { + $dataArray['public_view_password'] = $data->getPublicViewPassword(); + } + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); + } + if ($data->isInitialized('rowIdentifierType') && null !== $data->getRowIdentifierType()) { + $dataArray['row_identifier_type'] = $data->getRowIdentifierType(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => false]; } } diff --git a/generated/Normalizer/GridViewViewNormalizer.php b/generated/Normalizer/GridViewViewNormalizer.php index 61917a9..aede843 100644 --- a/generated/Normalizer/GridViewViewNormalizer.php +++ b/generated/Normalizer/GridViewViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,433 +20,227 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GridViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class GridViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\GridViewView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); - } - if (\array_key_exists('row_identifier_type', $data)) { - $object->setRowIdentifierType($data['row_identifier_type']); - unset($data['row_identifier_type']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\GridViewView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public_view_has_password', $data) && \is_int($data['public_view_has_password'])) { + $data['public_view_has_password'] = (bool) $data['public_view_has_password']; + } + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); - } - if ($object->isInitialized('rowIdentifierType') && null !== $object->getRowIdentifierType()) { - $data['row_identifier_type'] = $object->getRowIdentifierType(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewView::class => false]; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - } -} else { - class GridViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\GridViewView::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\GridViewView::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\GridViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('table', $data)) { + $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); + unset($data['table']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); + $object->setFilters($values); + unset($data['filters']); + } + if (\array_key_exists('filter_groups', $data)) { + $values_1 = []; + foreach ($data['filter_groups'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); } - if (\array_key_exists('row_identifier_type', $data)) { - $object->setRowIdentifierType($data['row_identifier_type']); - unset($data['row_identifier_type']); + $object->setFilterGroups($values_1); + unset($data['filter_groups']); + } + if (\array_key_exists('sortings', $data)) { + $values_2 = []; + foreach ($data['sortings'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); + $object->setSortings($values_2); + unset($data['sortings']); + } + if (\array_key_exists('group_bys', $data)) { + $values_3 = []; + foreach ($data['group_bys'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); + $object->setGroupBys($values_3); + unset($data['group_bys']); + } + if (\array_key_exists('decorations', $data)) { + $values_4 = []; + foreach ($data['decorations'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } + $object->setDecorations($values_4); + unset($data['decorations']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_has_password', $data)) { + $object->setPublicViewHasPassword($data['public_view_has_password']); + unset($data['public_view_has_password']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('owned_by_id', $data)) { + $object->setOwnedById($data['owned_by_id']); + unset($data['owned_by_id']); + } + if (\array_key_exists('row_identifier_type', $data)) { + $object->setRowIdentifierType($data['row_identifier_type']); + unset($data['row_identifier_type']); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_5; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $dataArray['table'] = $this->normalizer->normalize($data->getTable(), 'json', $context); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); + $dataArray['filters'] = $values; + } + if ($data->isInitialized('filterGroups') && null !== $data->getFilterGroups()) { + $values_1 = []; + foreach ($data->getFilterGroups() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); + $dataArray['filter_groups'] = $values_1; + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values_2 = []; + foreach ($data->getSortings() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - if ($object->isInitialized('rowIdentifierType') && null !== $object->getRowIdentifierType()) { - $data['row_identifier_type'] = $object->getRowIdentifierType(); + $dataArray['sortings'] = $values_2; + } + if ($data->isInitialized('groupBys') && null !== $data->getGroupBys()) { + $values_3 = []; + foreach ($data->getGroupBys() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); + $dataArray['group_bys'] = $values_3; + } + if ($data->isInitialized('decorations') && null !== $data->getDecorations()) { + $values_4 = []; + foreach ($data->getDecorations() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } + $dataArray['decorations'] = $values_4; + } + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); + } + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); + } + $dataArray['ownership_type'] = $data->getOwnershipType(); + if ($data->isInitialized('ownedById') && null !== $data->getOwnedById()) { + $dataArray['owned_by_id'] = $data->getOwnedById(); + } + if ($data->isInitialized('rowIdentifierType') && null !== $data->getRowIdentifierType()) { + $dataArray['row_identifier_type'] = $data->getRowIdentifierType(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_5; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\GridViewView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\GridViewView::class => false]; } } diff --git a/generated/Normalizer/HeadingElementCreateElementNormalizer.php b/generated/Normalizer/HeadingElementCreateElementNormalizer.php index addb535..def9fdc 100644 --- a/generated/Normalizer/HeadingElementCreateElementNormalizer.php +++ b/generated/Normalizer/HeadingElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,589 +20,293 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HeadingElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class HeadingElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('level', $data)) { - $object->setLevel($data['level']); - unset($data['level']); - } - if (\array_key_exists('font_color', $data)) { - $object->setFontColor($data['font_color']); - unset($data['font_color']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('level') && null !== $object->getLevel()) { - $data['level'] = $object->getLevel(); - } - if ($object->isInitialized('fontColor') && null !== $object->getFontColor()) { - $data['font_color'] = $object->getFontColor(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('level', $data)) { + $object->setLevel($data['level']); + unset($data['level']); + } + if (\array_key_exists('font_color', $data)) { + $object->setFontColor($data['font_color']); + unset($data['font_color']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => false]; - } + return $object; } -} else { - class HeadingElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('level', $data)) { - $object->setLevel($data['level']); - unset($data['level']); - } - if (\array_key_exists('font_color', $data)) { - $object->setFontColor($data['font_color']); - unset($data['font_color']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('level') && null !== $object->getLevel()) { - $data['level'] = $object->getLevel(); - } - if ($object->isInitialized('fontColor') && null !== $object->getFontColor()) { - $data['font_color'] = $object->getFontColor(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('level') && null !== $data->getLevel()) { + $dataArray['level'] = $data->getLevel(); + } + if ($data->isInitialized('fontColor') && null !== $data->getFontColor()) { + $dataArray['font_color'] = $data->getFontColor(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/HeadingElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/HeadingElementCreateElementStyleBackgroundFileNormalizer.php index 71f05fc..45188b2 100644 --- a/generated/Normalizer/HeadingElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/HeadingElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HeadingElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class HeadingElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class HeadingElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/HeadingElementElementNormalizer.php b/generated/Normalizer/HeadingElementElementNormalizer.php index 7e677ed..6cd28c0 100644 --- a/generated/Normalizer/HeadingElementElementNormalizer.php +++ b/generated/Normalizer/HeadingElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,619 +20,308 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HeadingElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class HeadingElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('level', $data)) { - $object->setLevel($data['level']); - unset($data['level']); - } - if (\array_key_exists('font_color', $data)) { - $object->setFontColor($data['font_color']); - unset($data['font_color']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('level') && null !== $object->getLevel()) { - $data['level'] = $object->getLevel(); - } - if ($object->isInitialized('fontColor') && null !== $object->getFontColor()) { - $data['font_color'] = $object->getFontColor(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('level', $data)) { + $object->setLevel($data['level']); + unset($data['level']); + } + if (\array_key_exists('font_color', $data)) { + $object->setFontColor($data['font_color']); + unset($data['font_color']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => false]; - } + return $object; } -} else { - class HeadingElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('level', $data)) { - $object->setLevel($data['level']); - unset($data['level']); - } - if (\array_key_exists('font_color', $data)) { - $object->setFontColor($data['font_color']); - unset($data['font_color']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('level') && null !== $object->getLevel()) { - $data['level'] = $object->getLevel(); - } - if ($object->isInitialized('fontColor') && null !== $object->getFontColor()) { - $data['font_color'] = $object->getFontColor(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('level') && null !== $data->getLevel()) { + $dataArray['level'] = $data->getLevel(); + } + if ($data->isInitialized('fontColor') && null !== $data->getFontColor()) { + $dataArray['font_color'] = $data->getFontColor(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => false]; } } diff --git a/generated/Normalizer/HeadingElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/HeadingElementElementStyleBackgroundFileNormalizer.php index 7da22a2..7bac8ec 100644 --- a/generated/Normalizer/HeadingElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/HeadingElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HeadingElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class HeadingElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class HeadingElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/HeadingElementPublicElementNormalizer.php b/generated/Normalizer/HeadingElementPublicElementNormalizer.php index 644f6f5..b158c44 100644 --- a/generated/Normalizer/HeadingElementPublicElementNormalizer.php +++ b/generated/Normalizer/HeadingElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,611 +20,304 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HeadingElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class HeadingElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('level', $data)) { - $object->setLevel($data['level']); - unset($data['level']); - } - if (\array_key_exists('font_color', $data)) { - $object->setFontColor($data['font_color']); - unset($data['font_color']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('level') && null !== $object->getLevel()) { - $data['level'] = $object->getLevel(); - } - if ($object->isInitialized('fontColor') && null !== $object->getFontColor()) { - $data['font_color'] = $object->getFontColor(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('level', $data)) { + $object->setLevel($data['level']); + unset($data['level']); + } + if (\array_key_exists('font_color', $data)) { + $object->setFontColor($data['font_color']); + unset($data['font_color']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => false]; - } + return $object; } -} else { - class HeadingElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('level', $data)) { - $object->setLevel($data['level']); - unset($data['level']); - } - if (\array_key_exists('font_color', $data)) { - $object->setFontColor($data['font_color']); - unset($data['font_color']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('level') && null !== $object->getLevel()) { - $data['level'] = $object->getLevel(); - } - if ($object->isInitialized('fontColor') && null !== $object->getFontColor()) { - $data['font_color'] = $object->getFontColor(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('level') && null !== $data->getLevel()) { + $dataArray['level'] = $data->getLevel(); + } + if ($data->isInitialized('fontColor') && null !== $data->getFontColor()) { + $dataArray['font_color'] = $data->getFontColor(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/HeadingElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/HeadingElementPublicElementStyleBackgroundFileNormalizer.php index 5b269ad..2ec150c 100644 --- a/generated/Normalizer/HeadingElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/HeadingElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HeadingElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class HeadingElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class HeadingElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/HeadingElementUpdateElementNormalizer.php b/generated/Normalizer/HeadingElementUpdateElementNormalizer.php index 4eaa978..d74f687 100644 --- a/generated/Normalizer/HeadingElementUpdateElementNormalizer.php +++ b/generated/Normalizer/HeadingElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,557 +20,277 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HeadingElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class HeadingElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('level', $data)) { - $object->setLevel($data['level']); - unset($data['level']); - } - if (\array_key_exists('font_color', $data)) { - $object->setFontColor($data['font_color']); - unset($data['font_color']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('level') && null !== $object->getLevel()) { - $data['level'] = $object->getLevel(); - } - if ($object->isInitialized('fontColor') && null !== $object->getFontColor()) { - $data['font_color'] = $object->getFontColor(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('level', $data)) { + $object->setLevel($data['level']); + unset($data['level']); + } + if (\array_key_exists('font_color', $data)) { + $object->setFontColor($data['font_color']); + unset($data['font_color']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => false]; - } + return $object; } -} else { - class HeadingElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('level', $data)) { - $object->setLevel($data['level']); - unset($data['level']); - } - if (\array_key_exists('font_color', $data)) { - $object->setFontColor($data['font_color']); - unset($data['font_color']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('level') && null !== $object->getLevel()) { - $data['level'] = $object->getLevel(); - } - if ($object->isInitialized('fontColor') && null !== $object->getFontColor()) { - $data['font_color'] = $object->getFontColor(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('level') && null !== $data->getLevel()) { + $dataArray['level'] = $data->getLevel(); + } + if ($data->isInitialized('fontColor') && null !== $data->getFontColor()) { + $dataArray['font_color'] = $data->getFontColor(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/HeadingElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/HeadingElementUpdateElementStyleBackgroundFileNormalizer.php index f36808f..7f21f70 100644 --- a/generated/Normalizer/HeadingElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/HeadingElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HeadingElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class HeadingElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class HeadingElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/IFrameElementCreateElementNormalizer.php b/generated/Normalizer/IFrameElementCreateElementNormalizer.php index c4ae330..b503bc6 100644 --- a/generated/Normalizer/IFrameElementCreateElementNormalizer.php +++ b/generated/Normalizer/IFrameElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,593 +20,295 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class IFrameElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class IFrameElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('source_type', $data)) { - $object->setSourceType($data['source_type']); - unset($data['source_type']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('embed', $data)) { - $object->setEmbed($data['embed']); - unset($data['embed']); - } - if (\array_key_exists('height', $data)) { - $object->setHeight($data['height']); - unset($data['height']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('sourceType') && null !== $object->getSourceType()) { - $data['source_type'] = $object->getSourceType(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('embed') && null !== $object->getEmbed()) { - $data['embed'] = $object->getEmbed(); - } - if ($object->isInitialized('height') && null !== $object->getHeight()) { - $data['height'] = $object->getHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('source_type', $data)) { + $object->setSourceType($data['source_type']); + unset($data['source_type']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('embed', $data)) { + $object->setEmbed($data['embed']); + unset($data['embed']); + } + if (\array_key_exists('height', $data)) { + $object->setHeight($data['height']); + unset($data['height']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => false]; - } + return $object; } -} else { - class IFrameElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('source_type', $data)) { - $object->setSourceType($data['source_type']); - unset($data['source_type']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('embed', $data)) { - $object->setEmbed($data['embed']); - unset($data['embed']); - } - if (\array_key_exists('height', $data)) { - $object->setHeight($data['height']); - unset($data['height']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('sourceType') && null !== $object->getSourceType()) { - $data['source_type'] = $object->getSourceType(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('embed') && null !== $object->getEmbed()) { - $data['embed'] = $object->getEmbed(); - } - if ($object->isInitialized('height') && null !== $object->getHeight()) { - $data['height'] = $object->getHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('sourceType') && null !== $data->getSourceType()) { + $dataArray['source_type'] = $data->getSourceType(); + } + if ($data->isInitialized('url') && null !== $data->getUrl()) { + $dataArray['url'] = $data->getUrl(); + } + if ($data->isInitialized('embed') && null !== $data->getEmbed()) { + $dataArray['embed'] = $data->getEmbed(); + } + if ($data->isInitialized('height') && null !== $data->getHeight()) { + $dataArray['height'] = $data->getHeight(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/IFrameElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/IFrameElementCreateElementStyleBackgroundFileNormalizer.php index efae386..a7357f5 100644 --- a/generated/Normalizer/IFrameElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/IFrameElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class IFrameElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class IFrameElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class IFrameElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/IFrameElementElementNormalizer.php b/generated/Normalizer/IFrameElementElementNormalizer.php index 8876479..e1d5e24 100644 --- a/generated/Normalizer/IFrameElementElementNormalizer.php +++ b/generated/Normalizer/IFrameElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,623 +20,310 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class IFrameElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class IFrameElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('source_type', $data)) { - $object->setSourceType($data['source_type']); - unset($data['source_type']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('embed', $data)) { - $object->setEmbed($data['embed']); - unset($data['embed']); - } - if (\array_key_exists('height', $data)) { - $object->setHeight($data['height']); - unset($data['height']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('sourceType') && null !== $object->getSourceType()) { - $data['source_type'] = $object->getSourceType(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('embed') && null !== $object->getEmbed()) { - $data['embed'] = $object->getEmbed(); - } - if ($object->isInitialized('height') && null !== $object->getHeight()) { - $data['height'] = $object->getHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('source_type', $data)) { + $object->setSourceType($data['source_type']); + unset($data['source_type']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('embed', $data)) { + $object->setEmbed($data['embed']); + unset($data['embed']); + } + if (\array_key_exists('height', $data)) { + $object->setHeight($data['height']); + unset($data['height']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => false]; - } + return $object; } -} else { - class IFrameElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('source_type', $data)) { - $object->setSourceType($data['source_type']); - unset($data['source_type']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('embed', $data)) { - $object->setEmbed($data['embed']); - unset($data['embed']); - } - if (\array_key_exists('height', $data)) { - $object->setHeight($data['height']); - unset($data['height']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('sourceType') && null !== $object->getSourceType()) { - $data['source_type'] = $object->getSourceType(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('embed') && null !== $object->getEmbed()) { - $data['embed'] = $object->getEmbed(); - } - if ($object->isInitialized('height') && null !== $object->getHeight()) { - $data['height'] = $object->getHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('sourceType') && null !== $data->getSourceType()) { + $dataArray['source_type'] = $data->getSourceType(); + } + if ($data->isInitialized('url') && null !== $data->getUrl()) { + $dataArray['url'] = $data->getUrl(); + } + if ($data->isInitialized('embed') && null !== $data->getEmbed()) { + $dataArray['embed'] = $data->getEmbed(); + } + if ($data->isInitialized('height') && null !== $data->getHeight()) { + $dataArray['height'] = $data->getHeight(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => false]; } } diff --git a/generated/Normalizer/IFrameElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/IFrameElementElementStyleBackgroundFileNormalizer.php index b44c689..557db65 100644 --- a/generated/Normalizer/IFrameElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/IFrameElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class IFrameElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class IFrameElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class IFrameElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/IFrameElementPublicElementNormalizer.php b/generated/Normalizer/IFrameElementPublicElementNormalizer.php index d3f9c7f..5ffaf0e 100644 --- a/generated/Normalizer/IFrameElementPublicElementNormalizer.php +++ b/generated/Normalizer/IFrameElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,615 +20,306 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class IFrameElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class IFrameElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('source_type', $data)) { - $object->setSourceType($data['source_type']); - unset($data['source_type']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('embed', $data)) { - $object->setEmbed($data['embed']); - unset($data['embed']); - } - if (\array_key_exists('height', $data)) { - $object->setHeight($data['height']); - unset($data['height']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('sourceType') && null !== $object->getSourceType()) { - $data['source_type'] = $object->getSourceType(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('embed') && null !== $object->getEmbed()) { - $data['embed'] = $object->getEmbed(); - } - if ($object->isInitialized('height') && null !== $object->getHeight()) { - $data['height'] = $object->getHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('source_type', $data)) { + $object->setSourceType($data['source_type']); + unset($data['source_type']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('embed', $data)) { + $object->setEmbed($data['embed']); + unset($data['embed']); + } + if (\array_key_exists('height', $data)) { + $object->setHeight($data['height']); + unset($data['height']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => false]; - } + return $object; } -} else { - class IFrameElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('source_type', $data)) { - $object->setSourceType($data['source_type']); - unset($data['source_type']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('embed', $data)) { - $object->setEmbed($data['embed']); - unset($data['embed']); - } - if (\array_key_exists('height', $data)) { - $object->setHeight($data['height']); - unset($data['height']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('sourceType') && null !== $object->getSourceType()) { - $data['source_type'] = $object->getSourceType(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('embed') && null !== $object->getEmbed()) { - $data['embed'] = $object->getEmbed(); - } - if ($object->isInitialized('height') && null !== $object->getHeight()) { - $data['height'] = $object->getHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('sourceType') && null !== $data->getSourceType()) { + $dataArray['source_type'] = $data->getSourceType(); + } + if ($data->isInitialized('url') && null !== $data->getUrl()) { + $dataArray['url'] = $data->getUrl(); + } + if ($data->isInitialized('embed') && null !== $data->getEmbed()) { + $dataArray['embed'] = $data->getEmbed(); + } + if ($data->isInitialized('height') && null !== $data->getHeight()) { + $dataArray['height'] = $data->getHeight(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/IFrameElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/IFrameElementPublicElementStyleBackgroundFileNormalizer.php index 72cf222..1ab7e6f 100644 --- a/generated/Normalizer/IFrameElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/IFrameElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class IFrameElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class IFrameElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class IFrameElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/IFrameElementUpdateElementNormalizer.php b/generated/Normalizer/IFrameElementUpdateElementNormalizer.php index c6a487c..b1c012d 100644 --- a/generated/Normalizer/IFrameElementUpdateElementNormalizer.php +++ b/generated/Normalizer/IFrameElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,561 +20,279 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class IFrameElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class IFrameElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('source_type', $data)) { - $object->setSourceType($data['source_type']); - unset($data['source_type']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('embed', $data)) { - $object->setEmbed($data['embed']); - unset($data['embed']); - } - if (\array_key_exists('height', $data)) { - $object->setHeight($data['height']); - unset($data['height']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('sourceType') && null !== $object->getSourceType()) { - $data['source_type'] = $object->getSourceType(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('embed') && null !== $object->getEmbed()) { - $data['embed'] = $object->getEmbed(); - } - if ($object->isInitialized('height') && null !== $object->getHeight()) { - $data['height'] = $object->getHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('source_type', $data)) { + $object->setSourceType($data['source_type']); + unset($data['source_type']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('embed', $data)) { + $object->setEmbed($data['embed']); + unset($data['embed']); + } + if (\array_key_exists('height', $data)) { + $object->setHeight($data['height']); + unset($data['height']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => false]; - } + return $object; } -} else { - class IFrameElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('source_type', $data)) { - $object->setSourceType($data['source_type']); - unset($data['source_type']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('embed', $data)) { - $object->setEmbed($data['embed']); - unset($data['embed']); - } - if (\array_key_exists('height', $data)) { - $object->setHeight($data['height']); - unset($data['height']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('sourceType') && null !== $object->getSourceType()) { - $data['source_type'] = $object->getSourceType(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('embed') && null !== $object->getEmbed()) { - $data['embed'] = $object->getEmbed(); - } - if ($object->isInitialized('height') && null !== $object->getHeight()) { - $data['height'] = $object->getHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('sourceType') && null !== $data->getSourceType()) { + $dataArray['source_type'] = $data->getSourceType(); + } + if ($data->isInitialized('url') && null !== $data->getUrl()) { + $dataArray['url'] = $data->getUrl(); + } + if ($data->isInitialized('embed') && null !== $data->getEmbed()) { + $dataArray['embed'] = $data->getEmbed(); + } + if ($data->isInitialized('height') && null !== $data->getHeight()) { + $dataArray['height'] = $data->getHeight(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/IFrameElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/IFrameElementUpdateElementStyleBackgroundFileNormalizer.php index c1caad2..289b44a 100644 --- a/generated/Normalizer/IFrameElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/IFrameElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class IFrameElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class IFrameElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class IFrameElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ImageConfigBlockImageNormalizer.php b/generated/Normalizer/ImageConfigBlockImageNormalizer.php index 8b06e51..ba6a1fe 100644 --- a/generated/Normalizer/ImageConfigBlockImageNormalizer.php +++ b/generated/Normalizer/ImageConfigBlockImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageConfigBlockImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageConfigBlockImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('image_alignment', $data)) { + $object->setImageAlignment($data['image_alignment']); + unset($data['image_alignment']); + } + if (\array_key_exists('image_max_width', $data)) { + $object->setImageMaxWidth($data['image_max_width']); + unset($data['image_max_width']); + } + if (\array_key_exists('image_max_height', $data)) { + $object->setImageMaxHeight($data['image_max_height']); + unset($data['image_max_height']); + } + if (\array_key_exists('image_constraint', $data)) { + $object->setImageConstraint($data['image_constraint']); + unset($data['image_constraint']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => false]; - } + return $object; } -} else { - class ImageConfigBlockImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('imageAlignment') && null !== $data->getImageAlignment()) { + $dataArray['image_alignment'] = $data->getImageAlignment(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class === get_class($data); + if ($data->isInitialized('imageMaxWidth') && null !== $data->getImageMaxWidth()) { + $dataArray['image_max_width'] = $data->getImageMaxWidth(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('imageMaxHeight') && null !== $data->getImageMaxHeight()) { + $dataArray['image_max_height'] = $data->getImageMaxHeight(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageConstraint') && null !== $data->getImageConstraint()) { + $dataArray['image_constraint'] = $data->getImageConstraint(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => false]; } } diff --git a/generated/Normalizer/ImageConfigBlockNormalizer.php b/generated/Normalizer/ImageConfigBlockNormalizer.php index 67133f6..e6a6546 100644 --- a/generated/Normalizer/ImageConfigBlockNormalizer.php +++ b/generated/Normalizer/ImageConfigBlockNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('image', $data)) { - $object->setImage($this->denormalizer->denormalize($data['image'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class, 'json', $context)); - unset($data['image']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageConfigBlock(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('image') && null !== $object->getImage()) { - $data['image'] = $this->normalizer->normalize($object->getImage(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('image', $data)) { + $object->setImage($this->denormalizer->denormalize($data['image'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class, 'json', $context)); + unset($data['image']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => false]; - } + return $object; } -} else { - class ImageConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('image') && null !== $data->getImage()) { + $dataArray['image'] = $this->normalizer->normalize($data->getImage(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('image', $data)) { - $object->setImage($this->denormalizer->denormalize($data['image'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class, 'json', $context)); - unset($data['image']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('image') && null !== $object->getImage()) { - $data['image'] = $this->normalizer->normalize($object->getImage(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => false]; } } diff --git a/generated/Normalizer/ImageElementCreateElementImageFileNormalizer.php b/generated/Normalizer/ImageElementCreateElementImageFileNormalizer.php index 6f97572..0e78c46 100644 --- a/generated/Normalizer/ImageElementCreateElementImageFileNormalizer.php +++ b/generated/Normalizer/ImageElementCreateElementImageFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementCreateElementImageFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementCreateElementImageFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => false]; - } + return $object; } -} else { - class ImageElementCreateElementImageFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => false]; } } diff --git a/generated/Normalizer/ImageElementCreateElementNormalizer.php b/generated/Normalizer/ImageElementCreateElementNormalizer.php index 4432d40..b9b55a6 100644 --- a/generated/Normalizer/ImageElementCreateElementNormalizer.php +++ b/generated/Normalizer/ImageElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,657 +20,327 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('image_source_type', $data)) { - $object->setImageSourceType($data['image_source_type']); - unset($data['image_source_type']); - } - if (\array_key_exists('image_file', $data) && null !== $data['image_file']) { - $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class, 'json', $context)); - unset($data['image_file']); - } elseif (\array_key_exists('image_file', $data) && null === $data['image_file']) { - $object->setImageFile(null); - } - if (\array_key_exists('image_url', $data)) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } - if (\array_key_exists('alt_text', $data)) { - $object->setAltText($data['alt_text']); - unset($data['alt_text']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('style_image_constraint', $data)) { - $object->setStyleImageConstraint($data['style_image_constraint']); - unset($data['style_image_constraint']); - } - if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { - $object->setStyleMaxWidth($data['style_max_width']); - unset($data['style_max_width']); - } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { - $object->setStyleMaxWidth(null); - } - if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { - $object->setStyleMaxHeight($data['style_max_height']); - unset($data['style_max_height']); - } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { - $object->setStyleMaxHeight(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('imageSourceType') && null !== $object->getImageSourceType()) { - $data['image_source_type'] = $object->getImageSourceType(); - } - if ($object->isInitialized('imageFile') && null !== $object->getImageFile()) { - $data['image_file'] = $this->normalizer->normalize($object->getImageFile(), 'json', $context); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('altText') && null !== $object->getAltText()) { - $data['alt_text'] = $object->getAltText(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('styleImageConstraint') && null !== $object->getStyleImageConstraint()) { - $data['style_image_constraint'] = $object->getStyleImageConstraint(); - } - if ($object->isInitialized('styleMaxWidth') && null !== $object->getStyleMaxWidth()) { - $data['style_max_width'] = $object->getStyleMaxWidth(); - } - if ($object->isInitialized('styleMaxHeight') && null !== $object->getStyleMaxHeight()) { - $data['style_max_height'] = $object->getStyleMaxHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('image_source_type', $data)) { + $object->setImageSourceType($data['image_source_type']); + unset($data['image_source_type']); + } + if (\array_key_exists('image_file', $data) && null !== $data['image_file']) { + $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class, 'json', $context)); + unset($data['image_file']); + } elseif (\array_key_exists('image_file', $data) && null === $data['image_file']) { + $object->setImageFile(null); + } + if (\array_key_exists('image_url', $data)) { + $object->setImageUrl($data['image_url']); + unset($data['image_url']); + } + if (\array_key_exists('alt_text', $data)) { + $object->setAltText($data['alt_text']); + unset($data['alt_text']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('style_image_constraint', $data)) { + $object->setStyleImageConstraint($data['style_image_constraint']); + unset($data['style_image_constraint']); + } + if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { + $object->setStyleMaxWidth($data['style_max_width']); + unset($data['style_max_width']); + } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { + $object->setStyleMaxWidth(null); + } + if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { + $object->setStyleMaxHeight($data['style_max_height']); + unset($data['style_max_height']); + } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { + $object->setStyleMaxHeight(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => false]; - } + return $object; } -} else { - class ImageElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('image_source_type', $data)) { - $object->setImageSourceType($data['image_source_type']); - unset($data['image_source_type']); - } - if (\array_key_exists('image_file', $data) && null !== $data['image_file']) { - $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class, 'json', $context)); - unset($data['image_file']); - } elseif (\array_key_exists('image_file', $data) && null === $data['image_file']) { - $object->setImageFile(null); - } - if (\array_key_exists('image_url', $data)) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } - if (\array_key_exists('alt_text', $data)) { - $object->setAltText($data['alt_text']); - unset($data['alt_text']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('style_image_constraint', $data)) { - $object->setStyleImageConstraint($data['style_image_constraint']); - unset($data['style_image_constraint']); - } - if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { - $object->setStyleMaxWidth($data['style_max_width']); - unset($data['style_max_width']); - } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { - $object->setStyleMaxWidth(null); - } - if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { - $object->setStyleMaxHeight($data['style_max_height']); - unset($data['style_max_height']); - } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { - $object->setStyleMaxHeight(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('imageSourceType') && null !== $object->getImageSourceType()) { - $data['image_source_type'] = $object->getImageSourceType(); - } - if ($object->isInitialized('imageFile') && null !== $object->getImageFile()) { - $data['image_file'] = $this->normalizer->normalize($object->getImageFile(), 'json', $context); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('altText') && null !== $object->getAltText()) { - $data['alt_text'] = $object->getAltText(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('styleImageConstraint') && null !== $object->getStyleImageConstraint()) { - $data['style_image_constraint'] = $object->getStyleImageConstraint(); - } - if ($object->isInitialized('styleMaxWidth') && null !== $object->getStyleMaxWidth()) { - $data['style_max_width'] = $object->getStyleMaxWidth(); - } - if ($object->isInitialized('styleMaxHeight') && null !== $object->getStyleMaxHeight()) { - $data['style_max_height'] = $object->getStyleMaxHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('imageSourceType') && null !== $data->getImageSourceType()) { + $dataArray['image_source_type'] = $data->getImageSourceType(); + } + if ($data->isInitialized('imageFile') && null !== $data->getImageFile()) { + $dataArray['image_file'] = $this->normalizer->normalize($data->getImageFile(), 'json', $context); + } + if ($data->isInitialized('imageUrl') && null !== $data->getImageUrl()) { + $dataArray['image_url'] = $data->getImageUrl(); + } + if ($data->isInitialized('altText') && null !== $data->getAltText()) { + $dataArray['alt_text'] = $data->getAltText(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('styleImageConstraint') && null !== $data->getStyleImageConstraint()) { + $dataArray['style_image_constraint'] = $data->getStyleImageConstraint(); + } + if ($data->isInitialized('styleMaxWidth') && null !== $data->getStyleMaxWidth()) { + $dataArray['style_max_width'] = $data->getStyleMaxWidth(); + } + if ($data->isInitialized('styleMaxHeight') && null !== $data->getStyleMaxHeight()) { + $dataArray['style_max_height'] = $data->getStyleMaxHeight(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/ImageElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ImageElementCreateElementStyleBackgroundFileNormalizer.php index ed91fa1..29b3b02 100644 --- a/generated/Normalizer/ImageElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ImageElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ImageElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ImageElementElementNormalizer.php b/generated/Normalizer/ImageElementElementNormalizer.php index ff893c7..1f53046 100644 --- a/generated/Normalizer/ImageElementElementNormalizer.php +++ b/generated/Normalizer/ImageElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,683 +20,340 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('image_source_type', $data)) { - $object->setImageSourceType($data['image_source_type']); - unset($data['image_source_type']); - } - if (\array_key_exists('image_file', $data)) { - $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\UserFile::class, 'json', $context)); - unset($data['image_file']); - } - if (\array_key_exists('image_url', $data)) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } - if (\array_key_exists('alt_text', $data)) { - $object->setAltText($data['alt_text']); - unset($data['alt_text']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('style_image_constraint', $data)) { - $object->setStyleImageConstraint($data['style_image_constraint']); - unset($data['style_image_constraint']); - } - if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { - $object->setStyleMaxWidth($data['style_max_width']); - unset($data['style_max_width']); - } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { - $object->setStyleMaxWidth(null); - } - if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { - $object->setStyleMaxHeight($data['style_max_height']); - unset($data['style_max_height']); - } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { - $object->setStyleMaxHeight(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('imageSourceType') && null !== $object->getImageSourceType()) { - $data['image_source_type'] = $object->getImageSourceType(); - } - if ($object->isInitialized('imageFile') && null !== $object->getImageFile()) { - $data['image_file'] = $this->normalizer->normalize($object->getImageFile(), 'json', $context); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('altText') && null !== $object->getAltText()) { - $data['alt_text'] = $object->getAltText(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('styleImageConstraint') && null !== $object->getStyleImageConstraint()) { - $data['style_image_constraint'] = $object->getStyleImageConstraint(); - } - if ($object->isInitialized('styleMaxWidth') && null !== $object->getStyleMaxWidth()) { - $data['style_max_width'] = $object->getStyleMaxWidth(); - } - if ($object->isInitialized('styleMaxHeight') && null !== $object->getStyleMaxHeight()) { - $data['style_max_height'] = $object->getStyleMaxHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('image_source_type', $data)) { + $object->setImageSourceType($data['image_source_type']); + unset($data['image_source_type']); + } + if (\array_key_exists('image_file', $data)) { + $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\UserFile::class, 'json', $context)); + unset($data['image_file']); + } + if (\array_key_exists('image_url', $data)) { + $object->setImageUrl($data['image_url']); + unset($data['image_url']); + } + if (\array_key_exists('alt_text', $data)) { + $object->setAltText($data['alt_text']); + unset($data['alt_text']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('style_image_constraint', $data)) { + $object->setStyleImageConstraint($data['style_image_constraint']); + unset($data['style_image_constraint']); + } + if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { + $object->setStyleMaxWidth($data['style_max_width']); + unset($data['style_max_width']); + } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { + $object->setStyleMaxWidth(null); + } + if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { + $object->setStyleMaxHeight($data['style_max_height']); + unset($data['style_max_height']); + } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { + $object->setStyleMaxHeight(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementElement::class => false]; - } + return $object; } -} else { - class ImageElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('image_source_type', $data)) { - $object->setImageSourceType($data['image_source_type']); - unset($data['image_source_type']); - } - if (\array_key_exists('image_file', $data)) { - $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\UserFile::class, 'json', $context)); - unset($data['image_file']); - } - if (\array_key_exists('image_url', $data)) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } - if (\array_key_exists('alt_text', $data)) { - $object->setAltText($data['alt_text']); - unset($data['alt_text']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('style_image_constraint', $data)) { - $object->setStyleImageConstraint($data['style_image_constraint']); - unset($data['style_image_constraint']); - } - if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { - $object->setStyleMaxWidth($data['style_max_width']); - unset($data['style_max_width']); - } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { - $object->setStyleMaxWidth(null); - } - if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { - $object->setStyleMaxHeight($data['style_max_height']); - unset($data['style_max_height']); - } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { - $object->setStyleMaxHeight(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('imageSourceType') && null !== $object->getImageSourceType()) { - $data['image_source_type'] = $object->getImageSourceType(); - } - if ($object->isInitialized('imageFile') && null !== $object->getImageFile()) { - $data['image_file'] = $this->normalizer->normalize($object->getImageFile(), 'json', $context); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('altText') && null !== $object->getAltText()) { - $data['alt_text'] = $object->getAltText(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('styleImageConstraint') && null !== $object->getStyleImageConstraint()) { - $data['style_image_constraint'] = $object->getStyleImageConstraint(); - } - if ($object->isInitialized('styleMaxWidth') && null !== $object->getStyleMaxWidth()) { - $data['style_max_width'] = $object->getStyleMaxWidth(); - } - if ($object->isInitialized('styleMaxHeight') && null !== $object->getStyleMaxHeight()) { - $data['style_max_height'] = $object->getStyleMaxHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('imageSourceType') && null !== $data->getImageSourceType()) { + $dataArray['image_source_type'] = $data->getImageSourceType(); + } + if ($data->isInitialized('imageFile') && null !== $data->getImageFile()) { + $dataArray['image_file'] = $this->normalizer->normalize($data->getImageFile(), 'json', $context); + } + if ($data->isInitialized('imageUrl') && null !== $data->getImageUrl()) { + $dataArray['image_url'] = $data->getImageUrl(); + } + if ($data->isInitialized('altText') && null !== $data->getAltText()) { + $dataArray['alt_text'] = $data->getAltText(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('styleImageConstraint') && null !== $data->getStyleImageConstraint()) { + $dataArray['style_image_constraint'] = $data->getStyleImageConstraint(); + } + if ($data->isInitialized('styleMaxWidth') && null !== $data->getStyleMaxWidth()) { + $dataArray['style_max_width'] = $data->getStyleMaxWidth(); + } + if ($data->isInitialized('styleMaxHeight') && null !== $data->getStyleMaxHeight()) { + $dataArray['style_max_height'] = $data->getStyleMaxHeight(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementElement::class => false]; } } diff --git a/generated/Normalizer/ImageElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ImageElementElementStyleBackgroundFileNormalizer.php index 542b9ab..a8c3dbe 100644 --- a/generated/Normalizer/ImageElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ImageElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ImageElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ImageElementPublicElementNormalizer.php b/generated/Normalizer/ImageElementPublicElementNormalizer.php index f85334a..ed4c2e6 100644 --- a/generated/Normalizer/ImageElementPublicElementNormalizer.php +++ b/generated/Normalizer/ImageElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,675 +20,336 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('image_source_type', $data)) { - $object->setImageSourceType($data['image_source_type']); - unset($data['image_source_type']); - } - if (\array_key_exists('image_file', $data)) { - $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\UserFile::class, 'json', $context)); - unset($data['image_file']); - } - if (\array_key_exists('image_url', $data)) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } - if (\array_key_exists('alt_text', $data)) { - $object->setAltText($data['alt_text']); - unset($data['alt_text']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('style_image_constraint', $data)) { - $object->setStyleImageConstraint($data['style_image_constraint']); - unset($data['style_image_constraint']); - } - if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { - $object->setStyleMaxWidth($data['style_max_width']); - unset($data['style_max_width']); - } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { - $object->setStyleMaxWidth(null); - } - if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { - $object->setStyleMaxHeight($data['style_max_height']); - unset($data['style_max_height']); - } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { - $object->setStyleMaxHeight(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('imageSourceType') && null !== $object->getImageSourceType()) { - $data['image_source_type'] = $object->getImageSourceType(); - } - if ($object->isInitialized('imageFile') && null !== $object->getImageFile()) { - $data['image_file'] = $this->normalizer->normalize($object->getImageFile(), 'json', $context); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('altText') && null !== $object->getAltText()) { - $data['alt_text'] = $object->getAltText(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('styleImageConstraint') && null !== $object->getStyleImageConstraint()) { - $data['style_image_constraint'] = $object->getStyleImageConstraint(); - } - if ($object->isInitialized('styleMaxWidth') && null !== $object->getStyleMaxWidth()) { - $data['style_max_width'] = $object->getStyleMaxWidth(); - } - if ($object->isInitialized('styleMaxHeight') && null !== $object->getStyleMaxHeight()) { - $data['style_max_height'] = $object->getStyleMaxHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('image_source_type', $data)) { + $object->setImageSourceType($data['image_source_type']); + unset($data['image_source_type']); + } + if (\array_key_exists('image_file', $data)) { + $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\UserFile::class, 'json', $context)); + unset($data['image_file']); + } + if (\array_key_exists('image_url', $data)) { + $object->setImageUrl($data['image_url']); + unset($data['image_url']); + } + if (\array_key_exists('alt_text', $data)) { + $object->setAltText($data['alt_text']); + unset($data['alt_text']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('style_image_constraint', $data)) { + $object->setStyleImageConstraint($data['style_image_constraint']); + unset($data['style_image_constraint']); + } + if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { + $object->setStyleMaxWidth($data['style_max_width']); + unset($data['style_max_width']); + } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { + $object->setStyleMaxWidth(null); + } + if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { + $object->setStyleMaxHeight($data['style_max_height']); + unset($data['style_max_height']); + } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { + $object->setStyleMaxHeight(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => false]; - } + return $object; } -} else { - class ImageElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('image_source_type', $data)) { - $object->setImageSourceType($data['image_source_type']); - unset($data['image_source_type']); - } - if (\array_key_exists('image_file', $data)) { - $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\UserFile::class, 'json', $context)); - unset($data['image_file']); - } - if (\array_key_exists('image_url', $data)) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } - if (\array_key_exists('alt_text', $data)) { - $object->setAltText($data['alt_text']); - unset($data['alt_text']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('style_image_constraint', $data)) { - $object->setStyleImageConstraint($data['style_image_constraint']); - unset($data['style_image_constraint']); - } - if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { - $object->setStyleMaxWidth($data['style_max_width']); - unset($data['style_max_width']); - } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { - $object->setStyleMaxWidth(null); - } - if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { - $object->setStyleMaxHeight($data['style_max_height']); - unset($data['style_max_height']); - } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { - $object->setStyleMaxHeight(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('imageSourceType') && null !== $object->getImageSourceType()) { - $data['image_source_type'] = $object->getImageSourceType(); - } - if ($object->isInitialized('imageFile') && null !== $object->getImageFile()) { - $data['image_file'] = $this->normalizer->normalize($object->getImageFile(), 'json', $context); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('altText') && null !== $object->getAltText()) { - $data['alt_text'] = $object->getAltText(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('styleImageConstraint') && null !== $object->getStyleImageConstraint()) { - $data['style_image_constraint'] = $object->getStyleImageConstraint(); - } - if ($object->isInitialized('styleMaxWidth') && null !== $object->getStyleMaxWidth()) { - $data['style_max_width'] = $object->getStyleMaxWidth(); - } - if ($object->isInitialized('styleMaxHeight') && null !== $object->getStyleMaxHeight()) { - $data['style_max_height'] = $object->getStyleMaxHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('imageSourceType') && null !== $data->getImageSourceType()) { + $dataArray['image_source_type'] = $data->getImageSourceType(); + } + if ($data->isInitialized('imageFile') && null !== $data->getImageFile()) { + $dataArray['image_file'] = $this->normalizer->normalize($data->getImageFile(), 'json', $context); + } + if ($data->isInitialized('imageUrl') && null !== $data->getImageUrl()) { + $dataArray['image_url'] = $data->getImageUrl(); + } + if ($data->isInitialized('altText') && null !== $data->getAltText()) { + $dataArray['alt_text'] = $data->getAltText(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('styleImageConstraint') && null !== $data->getStyleImageConstraint()) { + $dataArray['style_image_constraint'] = $data->getStyleImageConstraint(); + } + if ($data->isInitialized('styleMaxWidth') && null !== $data->getStyleMaxWidth()) { + $dataArray['style_max_width'] = $data->getStyleMaxWidth(); + } + if ($data->isInitialized('styleMaxHeight') && null !== $data->getStyleMaxHeight()) { + $dataArray['style_max_height'] = $data->getStyleMaxHeight(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/ImageElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ImageElementPublicElementStyleBackgroundFileNormalizer.php index 2361237..533afe6 100644 --- a/generated/Normalizer/ImageElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ImageElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ImageElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ImageElementUpdateElementImageFileNormalizer.php b/generated/Normalizer/ImageElementUpdateElementImageFileNormalizer.php index 9f33e69..445218c 100644 --- a/generated/Normalizer/ImageElementUpdateElementImageFileNormalizer.php +++ b/generated/Normalizer/ImageElementUpdateElementImageFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementUpdateElementImageFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementUpdateElementImageFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => false]; - } + return $object; } -} else { - class ImageElementUpdateElementImageFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => false]; } } diff --git a/generated/Normalizer/ImageElementUpdateElementNormalizer.php b/generated/Normalizer/ImageElementUpdateElementNormalizer.php index c161e38..0d24412 100644 --- a/generated/Normalizer/ImageElementUpdateElementNormalizer.php +++ b/generated/Normalizer/ImageElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,625 +20,311 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('image_source_type', $data)) { - $object->setImageSourceType($data['image_source_type']); - unset($data['image_source_type']); - } - if (\array_key_exists('image_file', $data) && null !== $data['image_file']) { - $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class, 'json', $context)); - unset($data['image_file']); - } elseif (\array_key_exists('image_file', $data) && null === $data['image_file']) { - $object->setImageFile(null); - } - if (\array_key_exists('image_url', $data)) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } - if (\array_key_exists('alt_text', $data)) { - $object->setAltText($data['alt_text']); - unset($data['alt_text']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('style_image_constraint', $data)) { - $object->setStyleImageConstraint($data['style_image_constraint']); - unset($data['style_image_constraint']); - } - if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { - $object->setStyleMaxWidth($data['style_max_width']); - unset($data['style_max_width']); - } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { - $object->setStyleMaxWidth(null); - } - if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { - $object->setStyleMaxHeight($data['style_max_height']); - unset($data['style_max_height']); - } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { - $object->setStyleMaxHeight(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('imageSourceType') && null !== $object->getImageSourceType()) { - $data['image_source_type'] = $object->getImageSourceType(); - } - if ($object->isInitialized('imageFile') && null !== $object->getImageFile()) { - $data['image_file'] = $this->normalizer->normalize($object->getImageFile(), 'json', $context); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('altText') && null !== $object->getAltText()) { - $data['alt_text'] = $object->getAltText(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('styleImageConstraint') && null !== $object->getStyleImageConstraint()) { - $data['style_image_constraint'] = $object->getStyleImageConstraint(); - } - if ($object->isInitialized('styleMaxWidth') && null !== $object->getStyleMaxWidth()) { - $data['style_max_width'] = $object->getStyleMaxWidth(); - } - if ($object->isInitialized('styleMaxHeight') && null !== $object->getStyleMaxHeight()) { - $data['style_max_height'] = $object->getStyleMaxHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('image_source_type', $data)) { + $object->setImageSourceType($data['image_source_type']); + unset($data['image_source_type']); + } + if (\array_key_exists('image_file', $data) && null !== $data['image_file']) { + $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class, 'json', $context)); + unset($data['image_file']); + } elseif (\array_key_exists('image_file', $data) && null === $data['image_file']) { + $object->setImageFile(null); + } + if (\array_key_exists('image_url', $data)) { + $object->setImageUrl($data['image_url']); + unset($data['image_url']); + } + if (\array_key_exists('alt_text', $data)) { + $object->setAltText($data['alt_text']); + unset($data['alt_text']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('style_image_constraint', $data)) { + $object->setStyleImageConstraint($data['style_image_constraint']); + unset($data['style_image_constraint']); + } + if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { + $object->setStyleMaxWidth($data['style_max_width']); + unset($data['style_max_width']); + } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { + $object->setStyleMaxWidth(null); + } + if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { + $object->setStyleMaxHeight($data['style_max_height']); + unset($data['style_max_height']); + } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { + $object->setStyleMaxHeight(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => false]; - } + return $object; } -} else { - class ImageElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('image_source_type', $data)) { - $object->setImageSourceType($data['image_source_type']); - unset($data['image_source_type']); - } - if (\array_key_exists('image_file', $data) && null !== $data['image_file']) { - $object->setImageFile($this->denormalizer->denormalize($data['image_file'], \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class, 'json', $context)); - unset($data['image_file']); - } elseif (\array_key_exists('image_file', $data) && null === $data['image_file']) { - $object->setImageFile(null); - } - if (\array_key_exists('image_url', $data)) { - $object->setImageUrl($data['image_url']); - unset($data['image_url']); - } - if (\array_key_exists('alt_text', $data)) { - $object->setAltText($data['alt_text']); - unset($data['alt_text']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('style_image_constraint', $data)) { - $object->setStyleImageConstraint($data['style_image_constraint']); - unset($data['style_image_constraint']); - } - if (\array_key_exists('style_max_width', $data) && null !== $data['style_max_width']) { - $object->setStyleMaxWidth($data['style_max_width']); - unset($data['style_max_width']); - } elseif (\array_key_exists('style_max_width', $data) && null === $data['style_max_width']) { - $object->setStyleMaxWidth(null); - } - if (\array_key_exists('style_max_height', $data) && null !== $data['style_max_height']) { - $object->setStyleMaxHeight($data['style_max_height']); - unset($data['style_max_height']); - } elseif (\array_key_exists('style_max_height', $data) && null === $data['style_max_height']) { - $object->setStyleMaxHeight(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('imageSourceType') && null !== $object->getImageSourceType()) { - $data['image_source_type'] = $object->getImageSourceType(); - } - if ($object->isInitialized('imageFile') && null !== $object->getImageFile()) { - $data['image_file'] = $this->normalizer->normalize($object->getImageFile(), 'json', $context); - } - if ($object->isInitialized('imageUrl') && null !== $object->getImageUrl()) { - $data['image_url'] = $object->getImageUrl(); - } - if ($object->isInitialized('altText') && null !== $object->getAltText()) { - $data['alt_text'] = $object->getAltText(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('styleImageConstraint') && null !== $object->getStyleImageConstraint()) { - $data['style_image_constraint'] = $object->getStyleImageConstraint(); - } - if ($object->isInitialized('styleMaxWidth') && null !== $object->getStyleMaxWidth()) { - $data['style_max_width'] = $object->getStyleMaxWidth(); - } - if ($object->isInitialized('styleMaxHeight') && null !== $object->getStyleMaxHeight()) { - $data['style_max_height'] = $object->getStyleMaxHeight(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('imageSourceType') && null !== $data->getImageSourceType()) { + $dataArray['image_source_type'] = $data->getImageSourceType(); + } + if ($data->isInitialized('imageFile') && null !== $data->getImageFile()) { + $dataArray['image_file'] = $this->normalizer->normalize($data->getImageFile(), 'json', $context); + } + if ($data->isInitialized('imageUrl') && null !== $data->getImageUrl()) { + $dataArray['image_url'] = $data->getImageUrl(); + } + if ($data->isInitialized('altText') && null !== $data->getAltText()) { + $dataArray['alt_text'] = $data->getAltText(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('styleImageConstraint') && null !== $data->getStyleImageConstraint()) { + $dataArray['style_image_constraint'] = $data->getStyleImageConstraint(); + } + if ($data->isInitialized('styleMaxWidth') && null !== $data->getStyleMaxWidth()) { + $dataArray['style_max_width'] = $data->getStyleMaxWidth(); + } + if ($data->isInitialized('styleMaxHeight') && null !== $data->getStyleMaxHeight()) { + $dataArray['style_max_height'] = $data->getStyleMaxHeight(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/ImageElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/ImageElementUpdateElementStyleBackgroundFileNormalizer.php index cf8fa1e..2363806 100644 --- a/generated/Normalizer/ImageElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/ImageElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class ImageElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ImageThemeConfigBlockNormalizer.php b/generated/Normalizer/ImageThemeConfigBlockNormalizer.php index 4f4bd6e..919b67c 100644 --- a/generated/Normalizer/ImageThemeConfigBlockNormalizer.php +++ b/generated/Normalizer/ImageThemeConfigBlockNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ImageThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('image_alignment', $data)) { + $object->setImageAlignment($data['image_alignment']); + unset($data['image_alignment']); + } + if (\array_key_exists('image_max_width', $data)) { + $object->setImageMaxWidth($data['image_max_width']); + unset($data['image_max_width']); + } + if (\array_key_exists('image_max_height', $data)) { + $object->setImageMaxHeight($data['image_max_height']); + unset($data['image_max_height']); + } + if (\array_key_exists('image_constraint', $data)) { + $object->setImageConstraint($data['image_constraint']); + unset($data['image_constraint']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => false]; - } + return $object; } -} else { - class ImageThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('imageAlignment') && null !== $data->getImageAlignment()) { + $dataArray['image_alignment'] = $data->getImageAlignment(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class === get_class($data); + if ($data->isInitialized('imageMaxWidth') && null !== $data->getImageMaxWidth()) { + $dataArray['image_max_width'] = $data->getImageMaxWidth(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('imageMaxHeight') && null !== $data->getImageMaxHeight()) { + $dataArray['image_max_height'] = $data->getImageMaxHeight(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageConstraint') && null !== $data->getImageConstraint()) { + $dataArray['image_constraint'] = $data->getImageConstraint(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => false]; } } diff --git a/generated/Normalizer/InputTextElementCreateElementNormalizer.php b/generated/Normalizer/InputTextElementCreateElementNormalizer.php index c65d57f..bdcc2ce 100644 --- a/generated/Normalizer/InputTextElementCreateElementNormalizer.php +++ b/generated/Normalizer/InputTextElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,649 +20,329 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InputTextElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InputTextElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('validation_type', $data)) { - $object->setValidationType($data['validation_type']); - unset($data['validation_type']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('is_multiline', $data)) { - $object->setIsMultiline($data['is_multiline']); - unset($data['is_multiline']); - } - if (\array_key_exists('rows', $data)) { - $object->setRows($data['rows']); - unset($data['rows']); - } - if (\array_key_exists('input_type', $data)) { - $object->setInputType($data['input_type']); - unset($data['input_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('is_multiline', $data) && \is_int($data['is_multiline'])) { + $data['is_multiline'] = (bool) $data['is_multiline']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('validationType') && null !== $object->getValidationType()) { - $data['validation_type'] = $object->getValidationType(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('isMultiline') && null !== $object->getIsMultiline()) { - $data['is_multiline'] = $object->getIsMultiline(); - } - if ($object->isInitialized('rows') && null !== $object->getRows()) { - $data['rows'] = $object->getRows(); - } - if ($object->isInitialized('inputType') && null !== $object->getInputType()) { - $data['input_type'] = $object->getInputType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('validation_type', $data)) { + $object->setValidationType($data['validation_type']); + unset($data['validation_type']); + } + if (\array_key_exists('placeholder', $data)) { + $object->setPlaceholder($data['placeholder']); + unset($data['placeholder']); + } + if (\array_key_exists('is_multiline', $data)) { + $object->setIsMultiline($data['is_multiline']); + unset($data['is_multiline']); + } + if (\array_key_exists('rows', $data)) { + $object->setRows($data['rows']); + unset($data['rows']); + } + if (\array_key_exists('input_type', $data)) { + $object->setInputType($data['input_type']); + unset($data['input_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => false]; - } + return $object; } -} else { - class InputTextElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('validation_type', $data)) { - $object->setValidationType($data['validation_type']); - unset($data['validation_type']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('is_multiline', $data)) { - $object->setIsMultiline($data['is_multiline']); - unset($data['is_multiline']); - } - if (\array_key_exists('rows', $data)) { - $object->setRows($data['rows']); - unset($data['rows']); - } - if (\array_key_exists('input_type', $data)) { - $object->setInputType($data['input_type']); - unset($data['input_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('validationType') && null !== $object->getValidationType()) { - $data['validation_type'] = $object->getValidationType(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('isMultiline') && null !== $object->getIsMultiline()) { - $data['is_multiline'] = $object->getIsMultiline(); - } - if ($object->isInitialized('rows') && null !== $object->getRows()) { - $data['rows'] = $object->getRows(); - } - if ($object->isInitialized('inputType') && null !== $object->getInputType()) { - $data['input_type'] = $object->getInputType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + if ($data->isInitialized('validationType') && null !== $data->getValidationType()) { + $dataArray['validation_type'] = $data->getValidationType(); + } + if ($data->isInitialized('placeholder') && null !== $data->getPlaceholder()) { + $dataArray['placeholder'] = $data->getPlaceholder(); + } + if ($data->isInitialized('isMultiline') && null !== $data->getIsMultiline()) { + $dataArray['is_multiline'] = $data->getIsMultiline(); + } + if ($data->isInitialized('rows') && null !== $data->getRows()) { + $dataArray['rows'] = $data->getRows(); + } + if ($data->isInitialized('inputType') && null !== $data->getInputType()) { + $dataArray['input_type'] = $data->getInputType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/InputTextElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/InputTextElementCreateElementStyleBackgroundFileNormalizer.php index d5be30c..8d6e3d4 100644 --- a/generated/Normalizer/InputTextElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/InputTextElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InputTextElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InputTextElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class InputTextElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/InputTextElementElementNormalizer.php b/generated/Normalizer/InputTextElementElementNormalizer.php index c210922..a7d5aa4 100644 --- a/generated/Normalizer/InputTextElementElementNormalizer.php +++ b/generated/Normalizer/InputTextElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,679 +20,344 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InputTextElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InputTextElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('validation_type', $data)) { - $object->setValidationType($data['validation_type']); - unset($data['validation_type']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('is_multiline', $data)) { - $object->setIsMultiline($data['is_multiline']); - unset($data['is_multiline']); - } - if (\array_key_exists('rows', $data)) { - $object->setRows($data['rows']); - unset($data['rows']); - } - if (\array_key_exists('input_type', $data)) { - $object->setInputType($data['input_type']); - unset($data['input_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('is_multiline', $data) && \is_int($data['is_multiline'])) { + $data['is_multiline'] = (bool) $data['is_multiline']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('validationType') && null !== $object->getValidationType()) { - $data['validation_type'] = $object->getValidationType(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('isMultiline') && null !== $object->getIsMultiline()) { - $data['is_multiline'] = $object->getIsMultiline(); - } - if ($object->isInitialized('rows') && null !== $object->getRows()) { - $data['rows'] = $object->getRows(); - } - if ($object->isInitialized('inputType') && null !== $object->getInputType()) { - $data['input_type'] = $object->getInputType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('validation_type', $data)) { + $object->setValidationType($data['validation_type']); + unset($data['validation_type']); + } + if (\array_key_exists('placeholder', $data)) { + $object->setPlaceholder($data['placeholder']); + unset($data['placeholder']); + } + if (\array_key_exists('is_multiline', $data)) { + $object->setIsMultiline($data['is_multiline']); + unset($data['is_multiline']); + } + if (\array_key_exists('rows', $data)) { + $object->setRows($data['rows']); + unset($data['rows']); + } + if (\array_key_exists('input_type', $data)) { + $object->setInputType($data['input_type']); + unset($data['input_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => false]; - } + return $object; } -} else { - class InputTextElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('validation_type', $data)) { - $object->setValidationType($data['validation_type']); - unset($data['validation_type']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('is_multiline', $data)) { - $object->setIsMultiline($data['is_multiline']); - unset($data['is_multiline']); - } - if (\array_key_exists('rows', $data)) { - $object->setRows($data['rows']); - unset($data['rows']); - } - if (\array_key_exists('input_type', $data)) { - $object->setInputType($data['input_type']); - unset($data['input_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('validationType') && null !== $object->getValidationType()) { - $data['validation_type'] = $object->getValidationType(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('isMultiline') && null !== $object->getIsMultiline()) { - $data['is_multiline'] = $object->getIsMultiline(); - } - if ($object->isInitialized('rows') && null !== $object->getRows()) { - $data['rows'] = $object->getRows(); - } - if ($object->isInitialized('inputType') && null !== $object->getInputType()) { - $data['input_type'] = $object->getInputType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + if ($data->isInitialized('validationType') && null !== $data->getValidationType()) { + $dataArray['validation_type'] = $data->getValidationType(); + } + if ($data->isInitialized('placeholder') && null !== $data->getPlaceholder()) { + $dataArray['placeholder'] = $data->getPlaceholder(); + } + if ($data->isInitialized('isMultiline') && null !== $data->getIsMultiline()) { + $dataArray['is_multiline'] = $data->getIsMultiline(); + } + if ($data->isInitialized('rows') && null !== $data->getRows()) { + $dataArray['rows'] = $data->getRows(); + } + if ($data->isInitialized('inputType') && null !== $data->getInputType()) { + $dataArray['input_type'] = $data->getInputType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => false]; } } diff --git a/generated/Normalizer/InputTextElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/InputTextElementElementStyleBackgroundFileNormalizer.php index 8af856d..678a725 100644 --- a/generated/Normalizer/InputTextElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/InputTextElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InputTextElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InputTextElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class InputTextElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/InputTextElementPublicElementNormalizer.php b/generated/Normalizer/InputTextElementPublicElementNormalizer.php index 732b7ae..bc99f9a 100644 --- a/generated/Normalizer/InputTextElementPublicElementNormalizer.php +++ b/generated/Normalizer/InputTextElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,671 +20,340 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InputTextElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InputTextElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('validation_type', $data)) { - $object->setValidationType($data['validation_type']); - unset($data['validation_type']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('is_multiline', $data)) { - $object->setIsMultiline($data['is_multiline']); - unset($data['is_multiline']); - } - if (\array_key_exists('rows', $data)) { - $object->setRows($data['rows']); - unset($data['rows']); - } - if (\array_key_exists('input_type', $data)) { - $object->setInputType($data['input_type']); - unset($data['input_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('is_multiline', $data) && \is_int($data['is_multiline'])) { + $data['is_multiline'] = (bool) $data['is_multiline']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('validationType') && null !== $object->getValidationType()) { - $data['validation_type'] = $object->getValidationType(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('isMultiline') && null !== $object->getIsMultiline()) { - $data['is_multiline'] = $object->getIsMultiline(); - } - if ($object->isInitialized('rows') && null !== $object->getRows()) { - $data['rows'] = $object->getRows(); - } - if ($object->isInitialized('inputType') && null !== $object->getInputType()) { - $data['input_type'] = $object->getInputType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('validation_type', $data)) { + $object->setValidationType($data['validation_type']); + unset($data['validation_type']); + } + if (\array_key_exists('placeholder', $data)) { + $object->setPlaceholder($data['placeholder']); + unset($data['placeholder']); + } + if (\array_key_exists('is_multiline', $data)) { + $object->setIsMultiline($data['is_multiline']); + unset($data['is_multiline']); + } + if (\array_key_exists('rows', $data)) { + $object->setRows($data['rows']); + unset($data['rows']); + } + if (\array_key_exists('input_type', $data)) { + $object->setInputType($data['input_type']); + unset($data['input_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => false]; - } + return $object; } -} else { - class InputTextElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('validation_type', $data)) { - $object->setValidationType($data['validation_type']); - unset($data['validation_type']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('is_multiline', $data)) { - $object->setIsMultiline($data['is_multiline']); - unset($data['is_multiline']); - } - if (\array_key_exists('rows', $data)) { - $object->setRows($data['rows']); - unset($data['rows']); - } - if (\array_key_exists('input_type', $data)) { - $object->setInputType($data['input_type']); - unset($data['input_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('validationType') && null !== $object->getValidationType()) { - $data['validation_type'] = $object->getValidationType(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('isMultiline') && null !== $object->getIsMultiline()) { - $data['is_multiline'] = $object->getIsMultiline(); - } - if ($object->isInitialized('rows') && null !== $object->getRows()) { - $data['rows'] = $object->getRows(); - } - if ($object->isInitialized('inputType') && null !== $object->getInputType()) { - $data['input_type'] = $object->getInputType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + if ($data->isInitialized('validationType') && null !== $data->getValidationType()) { + $dataArray['validation_type'] = $data->getValidationType(); + } + if ($data->isInitialized('placeholder') && null !== $data->getPlaceholder()) { + $dataArray['placeholder'] = $data->getPlaceholder(); + } + if ($data->isInitialized('isMultiline') && null !== $data->getIsMultiline()) { + $dataArray['is_multiline'] = $data->getIsMultiline(); + } + if ($data->isInitialized('rows') && null !== $data->getRows()) { + $dataArray['rows'] = $data->getRows(); + } + if ($data->isInitialized('inputType') && null !== $data->getInputType()) { + $dataArray['input_type'] = $data->getInputType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/InputTextElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/InputTextElementPublicElementStyleBackgroundFileNormalizer.php index 3c3deb1..7099014 100644 --- a/generated/Normalizer/InputTextElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/InputTextElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InputTextElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InputTextElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class InputTextElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/InputTextElementUpdateElementNormalizer.php b/generated/Normalizer/InputTextElementUpdateElementNormalizer.php index 0c0f4a3..a0ef6e9 100644 --- a/generated/Normalizer/InputTextElementUpdateElementNormalizer.php +++ b/generated/Normalizer/InputTextElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,617 +20,313 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InputTextElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InputTextElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('validation_type', $data)) { - $object->setValidationType($data['validation_type']); - unset($data['validation_type']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('is_multiline', $data)) { - $object->setIsMultiline($data['is_multiline']); - unset($data['is_multiline']); - } - if (\array_key_exists('rows', $data)) { - $object->setRows($data['rows']); - unset($data['rows']); - } - if (\array_key_exists('input_type', $data)) { - $object->setInputType($data['input_type']); - unset($data['input_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('is_multiline', $data) && \is_int($data['is_multiline'])) { + $data['is_multiline'] = (bool) $data['is_multiline']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('validationType') && null !== $object->getValidationType()) { - $data['validation_type'] = $object->getValidationType(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('isMultiline') && null !== $object->getIsMultiline()) { - $data['is_multiline'] = $object->getIsMultiline(); - } - if ($object->isInitialized('rows') && null !== $object->getRows()) { - $data['rows'] = $object->getRows(); - } - if ($object->isInitialized('inputType') && null !== $object->getInputType()) { - $data['input_type'] = $object->getInputType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data) && null !== $data['styles']) { + $object->setStyles($data['styles']); + unset($data['styles']); + } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { + $object->setStyles(null); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('label', $data)) { + $object->setLabel($data['label']); + unset($data['label']); + } + if (\array_key_exists('default_value', $data)) { + $object->setDefaultValue($data['default_value']); + unset($data['default_value']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('validation_type', $data)) { + $object->setValidationType($data['validation_type']); + unset($data['validation_type']); + } + if (\array_key_exists('placeholder', $data)) { + $object->setPlaceholder($data['placeholder']); + unset($data['placeholder']); + } + if (\array_key_exists('is_multiline', $data)) { + $object->setIsMultiline($data['is_multiline']); + unset($data['is_multiline']); + } + if (\array_key_exists('rows', $data)) { + $object->setRows($data['rows']); + unset($data['rows']); + } + if (\array_key_exists('input_type', $data)) { + $object->setInputType($data['input_type']); + unset($data['input_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => false]; - } + return $object; } -} else { - class InputTextElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $data->getStyles(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data) && null !== $data['styles']) { - $object->setStyles($data['styles']); - unset($data['styles']); - } elseif (\array_key_exists('styles', $data) && null === $data['styles']) { - $object->setStyles(null); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('label', $data)) { - $object->setLabel($data['label']); - unset($data['label']); - } - if (\array_key_exists('default_value', $data)) { - $object->setDefaultValue($data['default_value']); - unset($data['default_value']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('validation_type', $data)) { - $object->setValidationType($data['validation_type']); - unset($data['validation_type']); - } - if (\array_key_exists('placeholder', $data)) { - $object->setPlaceholder($data['placeholder']); - unset($data['placeholder']); - } - if (\array_key_exists('is_multiline', $data)) { - $object->setIsMultiline($data['is_multiline']); - unset($data['is_multiline']); - } - if (\array_key_exists('rows', $data)) { - $object->setRows($data['rows']); - unset($data['rows']); - } - if (\array_key_exists('input_type', $data)) { - $object->setInputType($data['input_type']); - unset($data['input_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $object->getStyles(); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('label') && null !== $object->getLabel()) { - $data['label'] = $object->getLabel(); - } - if ($object->isInitialized('defaultValue') && null !== $object->getDefaultValue()) { - $data['default_value'] = $object->getDefaultValue(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('validationType') && null !== $object->getValidationType()) { - $data['validation_type'] = $object->getValidationType(); - } - if ($object->isInitialized('placeholder') && null !== $object->getPlaceholder()) { - $data['placeholder'] = $object->getPlaceholder(); - } - if ($object->isInitialized('isMultiline') && null !== $object->getIsMultiline()) { - $data['is_multiline'] = $object->getIsMultiline(); - } - if ($object->isInitialized('rows') && null !== $object->getRows()) { - $data['rows'] = $object->getRows(); - } - if ($object->isInitialized('inputType') && null !== $object->getInputType()) { - $data['input_type'] = $object->getInputType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('label') && null !== $data->getLabel()) { + $dataArray['label'] = $data->getLabel(); + } + if ($data->isInitialized('defaultValue') && null !== $data->getDefaultValue()) { + $dataArray['default_value'] = $data->getDefaultValue(); + } + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); + } + if ($data->isInitialized('validationType') && null !== $data->getValidationType()) { + $dataArray['validation_type'] = $data->getValidationType(); + } + if ($data->isInitialized('placeholder') && null !== $data->getPlaceholder()) { + $dataArray['placeholder'] = $data->getPlaceholder(); + } + if ($data->isInitialized('isMultiline') && null !== $data->getIsMultiline()) { + $dataArray['is_multiline'] = $data->getIsMultiline(); + } + if ($data->isInitialized('rows') && null !== $data->getRows()) { + $dataArray['rows'] = $data->getRows(); + } + if ($data->isInitialized('inputType') && null !== $data->getInputType()) { + $dataArray['input_type'] = $data->getInputType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/InputTextElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/InputTextElementUpdateElementStyleBackgroundFileNormalizer.php index 1cef3ce..5ea215a 100644 --- a/generated/Normalizer/InputTextElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/InputTextElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InputTextElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InputTextElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class InputTextElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/InstallTemplateJobCreateJobNormalizer.php b/generated/Normalizer/InstallTemplateJobCreateJobNormalizer.php index 7b03131..aac8278 100644 --- a/generated/Normalizer/InstallTemplateJobCreateJobNormalizer.php +++ b/generated/Normalizer/InstallTemplateJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,167 +20,82 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InstallTemplateJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InstallTemplateJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data)) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } - if (\array_key_exists('template_id', $data)) { - $object->setTemplateId($data['template_id']); - unset($data['template_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('groupId') && null !== $object->getGroupId()) { - $data['group_id'] = $object->getGroupId(); - } - if ($object->isInitialized('workspaceId') && null !== $object->getWorkspaceId()) { - $data['workspace_id'] = $object->getWorkspaceId(); - } - $data['template_id'] = $object->getTemplateId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('group_id', $data)) { + $object->setGroupId($data['group_id']); + unset($data['group_id']); + } + if (\array_key_exists('workspace_id', $data)) { + $object->setWorkspaceId($data['workspace_id']); + unset($data['workspace_id']); + } + if (\array_key_exists('template_id', $data)) { + $object->setTemplateId($data['template_id']); + unset($data['template_id']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => false]; - } + return $object; } -} else { - class InstallTemplateJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('groupId') && null !== $data->getGroupId()) { + $dataArray['group_id'] = $data->getGroupId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class === get_class($data); + if ($data->isInitialized('workspaceId') && null !== $data->getWorkspaceId()) { + $dataArray['workspace_id'] = $data->getWorkspaceId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data)) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } - if (\array_key_exists('template_id', $data)) { - $object->setTemplateId($data['template_id']); - unset($data['template_id']); + $dataArray['template_id'] = $data->getTemplateId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('groupId') && null !== $object->getGroupId()) { - $data['group_id'] = $object->getGroupId(); - } - if ($object->isInitialized('workspaceId') && null !== $object->getWorkspaceId()) { - $data['workspace_id'] = $object->getWorkspaceId(); - } - $data['template_id'] = $object->getTemplateId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/InstallTemplateJobJobGroupNormalizer.php b/generated/Normalizer/InstallTemplateJobJobGroupNormalizer.php index e4b5aad..5e26446 100644 --- a/generated/Normalizer/InstallTemplateJobJobGroupNormalizer.php +++ b/generated/Normalizer/InstallTemplateJobJobGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InstallTemplateJobJobGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InstallTemplateJobJobGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class InstallTemplateJobJobGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => false]; } } diff --git a/generated/Normalizer/InstallTemplateJobJobNormalizer.php b/generated/Normalizer/InstallTemplateJobJobNormalizer.php index df6f704..48c4f91 100644 --- a/generated/Normalizer/InstallTemplateJobJobNormalizer.php +++ b/generated/Normalizer/InstallTemplateJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,201 +20,99 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InstallTemplateJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InstallTemplateJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class, 'json', $context)); - unset($data['workspace']); - } - if (\array_key_exists('template', $data)) { - $object->setTemplate($this->denormalizer->denormalize($data['template'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class, 'json', $context)); - unset($data['template']); - } - if (\array_key_exists('installed_applications', $data)) { - $object->setInstalledApplications($data['installed_applications']); - unset($data['installed_applications']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class, 'json', $context)); - unset($data['group']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class InstallTemplateJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class, 'json', $context)); - unset($data['workspace']); - } - if (\array_key_exists('template', $data)) { - $object->setTemplate($this->denormalizer->denormalize($data['template'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class, 'json', $context)); - unset($data['template']); - } - if (\array_key_exists('installed_applications', $data)) { - $object->setInstalledApplications($data['installed_applications']); - unset($data['installed_applications']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class, 'json', $context)); - unset($data['group']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class, 'json', $context)); + unset($data['workspace']); + } + if (\array_key_exists('template', $data)) { + $object->setTemplate($this->denormalizer->denormalize($data['template'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class, 'json', $context)); + unset($data['template']); + } + if (\array_key_exists('installed_applications', $data)) { + $object->setInstalledApplications($data['installed_applications']); + unset($data['installed_applications']); + } + if (\array_key_exists('group', $data)) { + $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class, 'json', $context)); + unset($data['group']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => false]; } } diff --git a/generated/Normalizer/InstallTemplateJobJobTemplateNormalizer.php b/generated/Normalizer/InstallTemplateJobJobTemplateNormalizer.php index 77a7c82..16a1a65 100644 --- a/generated/Normalizer/InstallTemplateJobJobTemplateNormalizer.php +++ b/generated/Normalizer/InstallTemplateJobJobTemplateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,189 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InstallTemplateJobJobTemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InstallTemplateJobJobTemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('icon', $data)) { - $object->setIcon($data['icon']); - unset($data['icon']); - } - if (\array_key_exists('keywords', $data)) { - $object->setKeywords($data['keywords']); - unset($data['keywords']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { - $object->setWorkspaceId(null); - } - if (\array_key_exists('is_default', $data)) { - $object->setIsDefault($data['is_default']); - unset($data['is_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['icon'] = $object->getIcon(); - if ($object->isInitialized('keywords') && null !== $object->getKeywords()) { - $data['keywords'] = $object->getKeywords(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class InstallTemplateJobJobTemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class === $type; + if (\array_key_exists('icon', $data)) { + $object->setIcon($data['icon']); + unset($data['icon']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class === get_class($data); + if (\array_key_exists('keywords', $data)) { + $object->setKeywords($data['keywords']); + unset($data['keywords']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('icon', $data)) { - $object->setIcon($data['icon']); - unset($data['icon']); - } - if (\array_key_exists('keywords', $data)) { - $object->setKeywords($data['keywords']); - unset($data['keywords']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { - $object->setWorkspaceId(null); - } - if (\array_key_exists('is_default', $data)) { - $object->setIsDefault($data['is_default']); - unset($data['is_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('group_id', $data)) { + $object->setGroupId($data['group_id']); + unset($data['group_id']); + } + if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { + $object->setWorkspaceId($data['workspace_id']); + unset($data['workspace_id']); + } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { + $object->setWorkspaceId(null); + } + if (\array_key_exists('is_default', $data)) { + $object->setIsDefault($data['is_default']); + unset($data['is_default']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['icon'] = $object->getIcon(); - if ($object->isInitialized('keywords') && null !== $object->getKeywords()) { - $data['keywords'] = $object->getKeywords(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['icon'] = $data->getIcon(); + if ($data->isInitialized('keywords') && null !== $data->getKeywords()) { + $dataArray['keywords'] = $data->getKeywords(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => false]; } } diff --git a/generated/Normalizer/InstallTemplateJobJobWorkspaceNormalizer.php b/generated/Normalizer/InstallTemplateJobJobWorkspaceNormalizer.php index b5de4fd..3e39efd 100644 --- a/generated/Normalizer/InstallTemplateJobJobWorkspaceNormalizer.php +++ b/generated/Normalizer/InstallTemplateJobJobWorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InstallTemplateJobJobWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InstallTemplateJobJobWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class InstallTemplateJobJobWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => false]; } } diff --git a/generated/Normalizer/InstanceIdNormalizer.php b/generated/Normalizer/InstanceIdNormalizer.php index 9ee21f0..495eae9 100644 --- a/generated/Normalizer/InstanceIdNormalizer.php +++ b/generated/Normalizer/InstanceIdNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,127 +20,62 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InstanceIdNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class InstanceIdNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\InstanceId::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstanceId::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstanceId::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstanceId::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstanceId(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('instance_id', $data)) { - $object->setInstanceId($data['instance_id']); - unset($data['instance_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\InstanceId(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('instance_id', $data)) { + $object->setInstanceId($data['instance_id']); + unset($data['instance_id']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstanceId::class => false]; - } + return $object; } -} else { - class InstanceIdNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\InstanceId::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\InstanceId::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\InstanceId(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('instance_id', $data)) { - $object->setInstanceId($data['instance_id']); - unset($data['instance_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\InstanceId::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\InstanceId::class => false]; } } diff --git a/generated/Normalizer/JaneObjectNormalizer.php b/generated/Normalizer/JaneObjectNormalizer.php index dec30c0..d495a10 100644 --- a/generated/Normalizer/JaneObjectNormalizer.php +++ b/generated/Normalizer/JaneObjectNormalizer.php @@ -12,7 +12,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -20,7051 +19,3524 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - protected $normalizers = [ - \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => AIFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AIFieldField::class => AIFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => AIFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => AIFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Account::class => AccountNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ActionScopes::class => ActionScopesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AdminDashboard::class => AdminDashboardNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => AdminDashboardPerDayNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => AirtableImportJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => AirtableImportJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLog::class => AuditLogNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => AuditLogActionTypeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => AuditLogExportJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => AuditLogExportJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogUser::class => AuditLogUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => AuditLogWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => AuthFormElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => AuthFormElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => AuthFormElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => AuthFormElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => AuthFormElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => AuthFormElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => AuthFormElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => AuthFormElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => AutonumberFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => AutonumberFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => AutonumberFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => BaseExporterOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => BaserowImpersonateAuthTokenNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => BatchCreateRoleAssignmentNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => BatchDeleteRowsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => BooleanFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => BooleanFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => BooleanFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => BooleanFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplication::class => BuilderApplicationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => BuilderApplicationGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => BuilderApplicationWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => BuilderApplicationThemeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => BuilderApplicationFaviconFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => BuilderBaseApplicationCreatePolymorphicNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => BuilderBaseApplicationUpdatePolymorphicNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => BuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => ButtonConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => ButtonConfigBlockButtonNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => ButtonElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => ButtonElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => ButtonElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => ButtonElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => ButtonElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => ButtonElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => ButtonElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => ButtonElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => ButtonLinkConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => ButtonLinkConfigBlockButtonNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => ButtonLinkConfigBlockLinkNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => ButtonThemeConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => CalendarViewCreateViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => CalendarViewExampleResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => CalendarViewExampleResponseStackNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => CalendarViewFieldOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewView::class => CalendarViewViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => ChangePasswordBodyValidationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => CheckboxElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => CheckboxElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => CheckboxElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => CheckboxElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => CheckboxElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => CheckboxElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => CheckboxElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => CheckboxElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => ChoiceElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => ChoiceElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => ChoiceElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => ChoiceElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => ChoiceElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => ChoiceElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => ChoiceElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => ChoiceElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceOption::class => ChoiceOptionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Collaborator::class => CollaboratorNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CollectionField::class => CollectionFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => ColumnElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => ColumnElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => ColumnElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => ColumnElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => ColumnElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => ColumnElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => ColumnElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => ColumnElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => CombinedThemeConfigBlocksNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => CombinedThemeConfigBlocksPageBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => ConditionalColorValueProviderConfColorNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => ConditionalColorValueProviderConfColorFilterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => ConditionalColorValueProviderConfColorFilterGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => ConditionalColorValueProviderConfColorsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => CountFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CountFieldField::class => CountFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => CountFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => CountFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatePage::class => CreatePageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => CreateRoleAssignmentNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => CreateSnapshotJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => CreateSnapshotJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => CreateViewFilterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => CreateViewFilterGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => CreateViewGroupByNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateViewSort::class => CreateViewSortNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => CreateWorkspaceInvitationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => CreatedByFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => CreatedByFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => CreatedByFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => CreatedOnFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => CreatedOnFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => CreatedOnFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => CsvExporterOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => CustomDomainCreateDomainNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => CustomDomainDomainNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Dashboard::class => DashboardNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => DatabaseApplicationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => DatabaseApplicationGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => DatabaseApplicationWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => DatabaseBaseApplicationCreatePolymorphicNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => DatabaseBaseApplicationUpdatePolymorphicNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => DateFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DateFieldField::class => DateFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => DateFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => DateFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => DuplicateApplicationJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => DuplicateApplicationJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateElement::class => DuplicateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => DuplicateFieldJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => DuplicateFieldJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => DuplicateFieldJobJobOriginalFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => DuplicateFieldJobJobDuplicatedFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => DuplicatePageJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => DuplicatePageJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => DuplicatePageJobJobOriginalPageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => DuplicatePageJobJobDuplicatedPageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => DuplicateTableJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => DuplicateTableJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => DuplicateTableJobJobOriginalTableNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => DuplicateTableJobJobDuplicatedTableNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => DurationFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DurationFieldField::class => DurationFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => DurationFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => DurationFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Element::class => ElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => ElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => EmailFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\EmailFieldField::class => EmailFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => EmailFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => EmailFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => EmailTesterRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => EmailTesterResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => BatchCreateRowRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => ExampleBatchRowsResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => BatchUpdateRowNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => ExampleRowRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => CreateRowRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => ExampleRowResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => ExampleRowResponseField10Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => ExampleRowResponseField12Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => ExampleRowResponseField16Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\RowResponse::class => RowResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ExportJob::class => ExportJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => FacebookAuthProviderModelAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Field::class => FieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => FieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => FileFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FileFieldField::class => FileFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => FileFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => FileFieldResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => FileFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => FileImportJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => FileImportJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => FileImportJobJobReportNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => FormContainerElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => FormContainerElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => FormContainerElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => FormContainerElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => FormContainerElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => FormContainerElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => FormContainerElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => FormContainerElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => FormViewCreateViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => FormViewCreateViewCoverImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => FormViewCreateViewLogoImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => FormViewFieldOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => FormViewFieldOptionsConditionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => FormViewFieldOptionsConditionGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => FormViewSubmittedNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewView::class => FormViewViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => FormViewViewCoverImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => FormViewViewLogoImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => FormulaFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => FormulaFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => FormulaFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => FormulaFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => FullHealthCheckNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => GalleryViewCreateViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => GalleryViewFieldOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GalleryViewView::class => GalleryViewViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => GenerateFormulaWithAIRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => GenerateFormulaWithAIResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => GeneratedConditionalColorCreateViewDecorationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => GeneratedConditionalColorUpdateViewDecorationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => GeneratedConditionalColorViewDecorationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => GeneratedConditionalColorViewDecorationValueProviderConfNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => GeneratedSingleSelectColorCreateViewDecorationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => GeneratedSingleSelectColorUpdateViewDecorationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => GeneratedSingleSelectColorViewDecorationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => GenerativeAISettingsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => GitHubAuthProviderModelAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => GitLabAuthProviderModelAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => GoogleAuthProviderModelAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => GridViewCreateViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => GridViewFieldOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GridViewFilter::class => GridViewFilterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GridViewView::class => GridViewViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => HeadingElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => HeadingElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => HeadingElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => HeadingElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => HeadingElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => HeadingElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => HeadingElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => HeadingElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => IFrameElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => IFrameElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => IFrameElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => IFrameElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => IFrameElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => IFrameElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => IFrameElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => IFrameElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => ImageConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => ImageConfigBlockImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => ImageElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => ImageElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => ImageElementCreateElementImageFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementElement::class => ImageElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => ImageElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => ImageElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => ImageElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => ImageElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => ImageElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => ImageElementUpdateElementImageFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => ImageThemeConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => InputTextElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => InputTextElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => InputTextElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => InputTextElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => InputTextElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => InputTextElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => InputTextElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => InputTextElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => InstallTemplateJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => InstallTemplateJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => InstallTemplateJobJobWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => InstallTemplateJobJobTemplateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => InstallTemplateJobJobGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\InstanceId::class => InstanceIdNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Job::class => JobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => KanbanViewCreateViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => KanbanViewExampleResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => KanbanViewExampleResponseStackNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => KanbanViewFieldOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\KanbanViewView::class => KanbanViewViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => LastModifiedByFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => LastModifiedByFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => LastModifiedByFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => LastModifiedFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => LastModifiedFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => LastModifiedFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\License::class => LicenseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LicenseUser::class => LicenseUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => LicenseUserLookupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => LicenseWithUsersNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => LinkElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => LinkElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkElementElement::class => LinkElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => LinkElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => LinkElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => LinkElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => LinkElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => LinkElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => LinkRowFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => LinkRowFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => LinkRowFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkRowValue::class => LinkRowValueNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => LinkThemeConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => ListWorkspaceUsersWithMemberDataNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => LocalBaserowContextDataNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => LocalBaserowFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => LocalBaserowGetRowNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => LocalBaserowGetRowCreateDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => LocalBaserowGetRowDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => LocalBaserowGetRowPublicDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => LocalBaserowGetRowServiceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => LocalBaserowGetRowUpdateDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => LocalBaserowIntegrationCreateIntegrationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => LocalBaserowIntegrationCreateIntegrationContextDataNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => LocalBaserowIntegrationIntegrationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => LocalBaserowIntegrationIntegrationContextDataNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => LocalBaserowIntegrationUpdateIntegrationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => LocalBaserowListRowsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => LocalBaserowListRowsCreateDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => LocalBaserowListRowsDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => LocalBaserowListRowsPublicDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => LocalBaserowListRowsServiceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => LocalBaserowListRowsUpdateDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => LocalBaserowTableServiceFieldMappingNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => LocalBaserowTableServiceFilterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => LocalBaserowTableServiceSortNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => LocalBaserowUpsertRowNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => LocalBaserowUpsertRowCreateDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => LocalBaserowUpsertRowDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => LocalBaserowUpsertRowPublicDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => LocalBaserowUpsertRowServiceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => LocalBaserowUpsertRowUpdateDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => LocalBaserowUserSourceBasePublicUserSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => LocalBaserowUserSourceCreateUserSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => LocalBaserowUserSourceUpdateUserSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => LocalBaserowUserSourceUserSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => LocalBaserowUserSourceUserSourceRolesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => LocalBaserowViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => LogoutWorkflowActionBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => LongTextFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => LongTextFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => LongTextFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => LongTextFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => LookupFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LookupFieldField::class => LookupFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => LookupFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => LookupFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => MultipleCollaboratorsFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => MultipleCollaboratorsFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => MultipleCollaboratorsFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => MultipleSelectFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => MultipleSelectFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => MultipleSelectFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => NotificationRecipientNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => NotificationRecipientSenderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => NotificationWorkflowActionBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => NumberFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NumberFieldField::class => NumberFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => NumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => NumberFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OllamaSettings::class => OllamaSettingsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OpenAISettings::class => OpenAISettingsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => OpenApiRoleAssignmentNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => OpenApiRoleAssignmentSubjectNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => OpenApiSubjectFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => OpenIdConnectAuthProviderModelAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => OpenPageWorkflowActionBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OrderApplications::class => OrderApplicationsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OrderDomains::class => OrderDomainsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OrderPages::class => OrderPagesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OrderTables::class => OrderTablesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OrderViews::class => OrderViewsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => OrderWorkflowActionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => OrderWorkspacesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Page::class => PageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PageParameterValue::class => PageParameterValueNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => PaginationSerializerAuditLogNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => PaginationSerializerAuditLogUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => PaginationSerializerAuditLogWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => PaginationRowResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => PaginationSerializerLicenseUserLookupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => PaginationSerializerLinkRowValueNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => PaginationSerializerNotificationRecipientNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => PaginationSerializerRowCommentNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => PaginationSerializerRowHistoryNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => PaginationSerializerTrashContentsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => PaginationSerializerUserAdminResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => PaginationSerializerWorkspacesAdminResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => PasswordAuthProviderModelAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => PasswordFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => PasswordFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => PasswordFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => PasswordFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedAccount::class => PatchedAccountNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => PatchedCombinedThemeConfigBlocksNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => PatchRowsRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => PatchRowRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => PatchedGenerativeAISettingsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => PatchedMoveDataSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => PatchedMoveElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => PatchedMoveIntegrationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => PatchedMoveUserSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedSettings::class => PatchedSettingsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => PatchedSettingsCoBrandingLogoNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => PatchedTableUpdateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => PatchedTableWebhookUpdateRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => PatchedTokenUpdateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => PatchedTokenUpdatePermissionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => PatchedTrashEntryRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => PatchedUndoRedoRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => PatchedUndoRedoRequestScopesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => PatchedUpdateDomainNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => PatchedUpdatePageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => PatchedUpdatePremiumViewAttributesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => PatchedUpdateViewFilterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => PatchedUpdateViewFilterGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => PatchedUpdateViewGroupByNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => PatchedUpdateViewSortNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => PatchedUpdateWorkspaceInvitationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => PatchedUpdateWorkspaceUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => PatchedUserAdminUpdateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => PatchedWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PathParam::class => PathParamNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PermissionObject::class => PermissionObjectNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => PhoneNumberFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => PhoneNumberFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => PhoneNumberFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicBuilder::class => PublicBuilderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => PublicBuilderThemeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicField::class => PublicFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicFormView::class => PublicFormViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => PublicFormViewCoverImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => PublicFormViewLogoImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => PublicFormViewFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => PublicFormViewFieldOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => PublicFormViewFieldOptionsFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicNone::class => PublicNoneNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicPage::class => PublicPageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicView::class => PublicViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => PublicViewAuthRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => PublicViewAuthResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => PublicViewGroupByNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => PublicViewInfoNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => PublicViewInfoViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicViewSort::class => PublicViewSortNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublicViewTable::class => PublicViewTableNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => PublishDomainJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => PublishDomainJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => RatingFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RatingFieldField::class => RatingFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => RatingFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => RatingFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Register::class => RegisterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RegisterLicense::class => RegisterLicenseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RelatedFields::class => RelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => RepeatElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => RepeatElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => RepeatElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => RepeatElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => RepeatElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => RepeatElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => RepeatElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => RepeatElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Report::class => ReportNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => ResetPasswordBodyValidationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => RestoreSnapshotJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => RestoreSnapshotJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => RollupFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RollupFieldField::class => RollupFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => RollupFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => RollupFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RowComment::class => RowCommentNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => RowCommentCreateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => RowCommentsNotificationModeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RowHistory::class => RowHistoryNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => RowHistoryUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\RowMetadata::class => RowMetadataNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SAMLResponse::class => SAMLResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => SamlAuthProviderModelAuthProviderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => SelectColorValueProviderConfNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SelectOption::class => SelectOptionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => SendResetPasswordEmailBodyValidationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Sender::class => SenderNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Settings::class => SettingsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => SettingsCoBrandingLogoNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => SingleAuditLogExportJobRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => SingleAuditLogExportJobResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => SingleDuplicateApplicationJobTypeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => SingleDuplicateFieldJobTypeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => SingleDuplicateFieldJobTypeOriginalFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => SingleDuplicatePageJobTypeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => SingleDuplicatePageJobTypeOriginalPageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => SingleDuplicatePageJobTypeDuplicatedPageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => SingleDuplicateTableJobTypeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => SingleDuplicateTableJobTypeOriginalTableNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => SingleDuplicateTableJobTypeDuplicatedTableNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => SingleFileImportJobSerializerClassNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => SingleFileImportJobSerializerClassReportNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => SingleInstallTemplateJobTypeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => SingleInstallTemplateJobTypeWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => SingleInstallTemplateJobTypeTemplateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => SingleInstallTemplateJobTypeGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => SingleSelectFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => SingleSelectFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => SingleSelectFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Snapshot::class => SnapshotNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => SnapshotCreatedByNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => SubDomainCreateDomainNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => SubDomainDomainNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\SubjectUser::class => SubjectUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Table::class => TableNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableCreate::class => TableCreateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => TableElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => TableElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableElementElement::class => TableElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => TableElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => TableElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => TableElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => TableElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => TableElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableImport::class => TableImportNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => TableSerializerWithFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableWebhook::class => TableWebhookNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => TableWebhookCallNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => TableWebhookCreateRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => TableWebhookTestCallRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => TableWebhookTestCallResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Team::class => TeamNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TeamResponse::class => TeamResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => TeamSampleSubjectNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TeamSubject::class => TeamSubjectNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => TeamSubjectResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Template::class => TemplateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TemplateCategories::class => TemplateCategoriesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => TextElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => TextElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextElementElement::class => TextElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => TextElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => TextElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => TextElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => TextElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => TextElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => TextFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextFieldField::class => TextFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => TextFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => TextFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Token::class => TokenNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TokenPermissions::class => TokenPermissionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => TokenBlacklistNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TokenCreate::class => TokenCreateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => TokenObtainPairNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => TokenObtainPairWithUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => TokenRefreshWithUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => TokenVerifyWithUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TrashContents::class => TrashContentsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TrashStructure::class => TrashStructureNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => TrashStructureApplicationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => TrashStructureGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => TypeFormulaRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => TypeFormulaResultNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => TypographyConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => TypographyConfigBlockTypographyNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => TypographyThemeConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => URLFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\URLFieldField::class => URLFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => URLFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => URLFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => UUIDFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => UUIDFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => UUIDFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => UUIDFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => UndoRedoActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => UndoRedoResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => UniqueRowValuesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\User::class => UserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => UserAdminCreateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => UserAdminGroupsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => UserAdminResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UserFile::class => UserFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => UserFileUploadViaURLRequestNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UserSourceUser::class => UserSourceUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => UserWorkspaceInvitationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => UsersPerUserSourceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => VerifyEmailAddressNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\View::class => ViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ViewDecoration::class => ViewDecorationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ViewFilter::class => ViewFilterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => ViewFilterGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => ViewGroupByNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ViewSort::class => ViewSortNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Workspace::class => WorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => WorkspaceAdminUsersNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => WorkspaceInvitationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => WorkspaceUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => WorkspaceUserEnterpriseTeamNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => WorkspaceUserWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => WorkspacesAdminResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => CalendarViewUpdateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => FormViewUpdateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => FormViewUpdateCoverImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => FormViewUpdateLogoImageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => GalleryViewUpdateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => GridViewUpdateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => KanbanViewUpdateNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => ApiHealthEmailPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => ApiAdminAuditLogGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => ApiAdminAuditLogActionTypesGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => ApiAdminAuditLogExportPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => ApiAdminAuditLogExportPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => ApiAdminAuditLogUsersGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => ApiAdminAuditLogWorkspacesGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => ApiAdminAuthProviderPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => ApiAdminGroupsGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => ApiAdminGroupsGroupIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => ApiAdminUsersGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => ApiAdminUsersPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => ApiAdminUsersUserIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => ApiAdminUsersUserIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => ApiAdminUsersImpersonatePostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => ApiAdminUsersImpersonatePostResponse200UserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => ApiAdminWorkspacesGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => ApiApplicationsGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => ApiApplicationsApplicationIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => ApiApplicationsApplicationIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => ApiApplicationsApplicationIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => ApiApplicationsApplicationIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => ApiApplicationsApplicationIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => ApiApplicationsApplicationIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => ApiApplicationsGroupGroupIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => ApiApplicationsGroupGroupIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => ApiApplicationsGroupGroupIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => ApiApplicationsGroupGroupIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => ApiAuditLogGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => ApiAuditLogActionTypesGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => ApiAuditLogExportPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => ApiAuditLogExportPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => ApiAuditLogUsersGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => ApiAuditLogWorkspacesGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => ApiBuilderBuilderIdDomainsGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => ApiBuilderBuilderIdDomainsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => ApiBuilderBuilderIdDomainsPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => ApiBuilderBuilderIdDomainsPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => ApiBuilderBuilderIdPagesPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => ApiBuilderBuilderIdPagesPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => ApiBuilderBuilderIdThemePatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => ApiBuilderBuilderIdThemePatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => ApiBuilderDomainsDomainIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => ApiBuilderDomainsDomainIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => ApiBuilderDomainsDomainIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => ApiBuilderDomainsDomainIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => ApiBuilderElementElementIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => ApiBuilderElementElementIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => ApiBuilderElementElementIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => ApiBuilderElementElementIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => ApiBuilderElementElementIdDuplicatePostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => ApiBuilderElementElementIdDuplicatePostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => ApiBuilderElementElementIdMovePatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => ApiBuilderElementElementIdMovePatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => ApiBuilderPagePageIdElementsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => ApiBuilderPagePageIdElementsPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => ApiBuilderPagePageIdElementsPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => ApiBuilderPagesPageIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => ApiBuilderPagesPageIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => ApiBuilderPagesPageIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => ApiBuilderPagesPageIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => ApiDatabaseExportJobIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => ApiDatabaseExportTableTableIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => ApiDatabaseExportTableTableIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => ApiDatabaseFieldsFieldIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => ApiDatabaseFieldsFieldIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => ApiDatabaseFieldsFieldIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => ApiDatabaseFieldsFieldIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => ApiDatabaseFieldsTableTableIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => ApiDatabaseFieldsTableTableIdGetResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => ApiDatabaseFieldsTableTableIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => ApiDatabaseFieldsTableTableIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => ApiDatabaseFieldsTableTableIdPostResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => ApiDatabaseFieldsTableTableIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => ApiDatabaseFormulaTableIdTypePostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => ApiDatabaseFormulaTableIdTypePostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => ApiDatabaseRowsNamesGetResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => ApiDatabaseRowsNamesGetResponse200TableIdNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => ApiDatabaseRowsNamesGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => ApiDatabaseRowsNamesGetResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => ApiDatabaseRowsNamesGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => ApiDatabaseRowsTableTableIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => ApiDatabaseRowsTableTableIdGetResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => ApiDatabaseRowsTableTableIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => ApiDatabaseRowsTableTableIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => ApiDatabaseRowsTableTableIdPostResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => ApiDatabaseRowsTableTableIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => ApiDatabaseTablesTableIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => ApiDatabaseTablesTableIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => ApiDatabaseTablesTableIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => ApiDatabaseTablesTableIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => ApiDatabaseTablesTableIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => ApiDatabaseTablesTableIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => ApiDatabaseTokensPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => ApiDatabaseTokensTokenIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => ApiDatabaseTokensTokenIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => ApiDatabaseTokensTokenIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => ApiDatabaseTokensTokenIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => ApiDatabaseTokensTokenIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => ApiDatabaseTokensTokenIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => ApiDatabaseTokensCheckGetResponse403Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => ApiDatabaseViewsViewIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => ApiDatabaseViewsViewIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => ApiDatabaseViewsViewIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => ApiDatabaseViewsViewIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => ApiDatabaseViewsViewIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => ApiDatabaseViewsViewIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer::class, +class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + protected $normalizers = [ + \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => AIFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AIFieldField::class => AIFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => AIFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => AIFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\Account::class => AccountNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ActionScopes::class => ActionScopesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AdminDashboard::class => AdminDashboardNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => AdminDashboardPerDayNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => AirtableImportJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => AirtableImportJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuditLog::class => AuditLogNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => AuditLogActionTypeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => AuditLogExportJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => AuditLogExportJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuditLogUser::class => AuditLogUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => AuditLogWorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => AuthFormElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => AuthFormElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => ApiDatabaseViewsGridViewIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => AuthFormElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => ApiDatabaseViewsGridViewIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => AuthFormElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => ApiDatabaseViewsGridViewIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => AuthFormElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => ApiDatabaseViewsGridViewIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => AuthFormElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => AuthFormElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => AuthFormElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => AutonumberFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => AutonumberFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => AutonumberFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => BaseExporterOptionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => BaserowImpersonateAuthTokenNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => BatchCreateRoleAssignmentNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => BatchDeleteRowsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => BooleanFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => BooleanFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => BooleanFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => BooleanFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderApplication::class => BuilderApplicationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => BuilderApplicationGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => BuilderApplicationWorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => BuilderApplicationThemeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => BuilderApplicationFaviconFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => BuilderBaseApplicationCreatePolymorphicNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => BuilderBaseApplicationUpdatePolymorphicNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => ApiDatabaseViewsTableTableIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => BuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => ApiDatabaseViewsTableTableIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => ButtonConfigBlockNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => ApiDatabaseViewsTableTableIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => ButtonConfigBlockButtonNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => ApiDatabaseViewsTableTableIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => ButtonElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => ButtonElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => ButtonElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => ButtonElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => ButtonElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => ButtonElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => ButtonElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => ButtonElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => ButtonLinkConfigBlockNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => ButtonLinkConfigBlockButtonNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => ButtonLinkConfigBlockLinkNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => ButtonThemeConfigBlockNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => CalendarViewCreateViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => CalendarViewExampleResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => CalendarViewExampleResponseStackNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => ApiFilesSignedDataGetResponse403Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => CalendarViewFieldOptionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => ApiGroupsGroupIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CalendarViewView::class => CalendarViewViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => ApiGroupsGroupIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => ChangePasswordBodyValidationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => ApiGroupsGroupIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => CheckboxElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => ApiGroupsGroupIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => CheckboxElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => ApiGroupsGroupIdLeavePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => CheckboxElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => ApiGroupsGroupIdLeavePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => CheckboxElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => ApiGroupsGroupIdPermissionsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => CheckboxElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => CheckboxElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => CheckboxElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => CheckboxElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => ChoiceElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => ChoiceElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => ChoiceElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => ChoiceElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => ChoiceElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => ChoiceElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => ChoiceElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => ChoiceElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ChoiceOption::class => ChoiceOptionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\Collaborator::class => CollaboratorNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CollectionField::class => CollectionFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => ApiGroupsInvitationsTokenTokenGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => ColumnElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => ApiGroupsInvitationsTokenTokenGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => ColumnElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => ColumnElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => ColumnElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => ApiGroupsUsersGroupUserIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => ColumnElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => ApiGroupsUsersGroupUserIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => ColumnElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => ApiGroupsUsersGroupGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => ColumnElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => ApiGroupsUsersGroupGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => ColumnElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => ApiIntegrationIntegrationIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => CombinedThemeConfigBlocksNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => ApiIntegrationIntegrationIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => CombinedThemeConfigBlocksPageBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => ApiIntegrationIntegrationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => ConditionalColorValueProviderConfColorNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => ApiIntegrationIntegrationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => ConditionalColorValueProviderConfColorFilterNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => ApiIntegrationIntegrationIdMovePatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => ConditionalColorValueProviderConfColorFilterGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => ApiIntegrationIntegrationIdMovePatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => ConditionalColorValueProviderConfColorsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => ApiJobsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => CountFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => ApiJobsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CountFieldField::class => CountFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => ApiJobsJobIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => CountFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => ApiLicensesPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => CountFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => ApiLicensesIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatePage::class => CreatePageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => ApiLicensesIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => CreateRoleAssignmentNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => ApiLicensesIdUserIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => CreateSnapshotJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => ApiLicensesIdUserIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => CreateSnapshotJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => ApiLicensesIdUserIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => CreateViewFilterNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => ApiLicensesIdUserIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => CreateViewFilterGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => ApiLicensesIdCheckGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => CreateViewGroupByNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => ApiLicensesIdFillSeatsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateViewSort::class => CreateViewSortNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => ApiLicensesIdFillSeatsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => CreateWorkspaceInvitationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => ApiLicensesIdLookupUsersGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => CreatedByFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => ApiLicensesIdRemoveAllUsersPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => CreatedByFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => ApiLicensesIdRemoveAllUsersPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => ApiNotificationsWorkspaceIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => CreatedByFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => ApiNotificationsWorkspaceIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => CreatedOnFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => ApiNotificationsWorkspaceIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => CreatedOnFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => ApiNotificationsWorkspaceIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => CreatedOnFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => CsvExporterOptionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => CustomDomainCreateDomainNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => CustomDomainDomainNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => ApiRoleGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\Dashboard::class => DashboardNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => ApiRoleGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => DatabaseApplicationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => ApiRoleGroupIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => DatabaseApplicationGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => ApiRoleGroupIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => DatabaseApplicationWorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => ApiRoleGroupIdBatchPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => DatabaseBaseApplicationCreatePolymorphicNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => ApiRoleGroupIdBatchPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => DatabaseBaseApplicationUpdatePolymorphicNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => ApiRoleWorkspaceIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => DateFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => ApiRoleWorkspaceIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DateFieldField::class => DateFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => ApiRoleWorkspaceIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => DateFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => ApiRoleWorkspaceIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => DateFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => ApiRoleWorkspaceIdBatchPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => DuplicateApplicationJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => ApiRoleWorkspaceIdBatchPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => DuplicateApplicationJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => ApiRowCommentsTableIdRowIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateElement::class => DuplicateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => ApiRowCommentsTableIdRowIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => DuplicateFieldJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => ApiRowCommentsTableIdRowIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => DuplicateFieldJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => ApiRowCommentsTableIdRowIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => DuplicateFieldJobJobOriginalFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => DuplicateFieldJobJobDuplicatedFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => DuplicatePageJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => DuplicatePageJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => DuplicatePageJobJobOriginalPageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => DuplicatePageJobJobDuplicatedPageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => DuplicateTableJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => DuplicateTableJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => DuplicateTableJobJobOriginalTableNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => ApiSnapshotsSnapshotIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => DuplicateTableJobJobDuplicatedTableNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => ApiSnapshotsSnapshotIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => DurationFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DurationFieldField::class => DurationFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => DurationFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => DurationFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\Element::class => ElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => ElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => EmailFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => ApiSsoSamlLoginUrlGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\EmailFieldField::class => EmailFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => ApiTeamsTeamIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => EmailFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => ApiTeamsTeamIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => EmailFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => ApiTeamsTeamIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => EmailTesterRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => ApiTeamsTeamIdPutResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => EmailTesterResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => ApiTeamsTeamIdPutResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => BatchCreateRowRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => ApiTeamsTeamIdSubjectsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => ExampleBatchRowsResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => ApiTeamsTeamIdSubjectsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => BatchUpdateRowNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => ApiTeamsTeamIdSubjectsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => ExampleRowRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => CreateRowRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => ExampleRowResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => ExampleRowResponseField10Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => ApiTeamsGroupGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => ExampleRowResponseField12Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => ApiTeamsGroupGroupIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => ExampleRowResponseField16Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => ApiTeamsGroupGroupIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\RowResponse::class => RowResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ExportJob::class => ExportJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => FacebookAuthProviderModelAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\Field::class => FieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => FieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => FileFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FileFieldField::class => FileFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => FileFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => FileFieldResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => FileFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => FileImportJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => FileImportJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => ApiTrashGroupGroupIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => FileImportJobJobReportNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => ApiTrashGroupGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => FormContainerElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => ApiTrashRestorePatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => FormContainerElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => FormContainerElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => FormContainerElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => ApiUserPostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => FormContainerElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => ApiUserPostResponse200UserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => FormContainerElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => ApiUserPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => FormContainerElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => ApiUserPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => FormContainerElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => ApiUserFilesUploadFilePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => FormViewCreateViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => ApiUserFilesUploadViaUrlPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => FormViewCreateViewCoverImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => ApiUserSourceAuthRefreshPostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => FormViewCreateViewLogoImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => ApiUserSourceUserSourceIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => FormViewFieldOptionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => ApiUserSourceUserSourceIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => FormViewFieldOptionsConditionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => ApiUserSourceUserSourceIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => FormViewFieldOptionsConditionGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => ApiUserSourceUserSourceIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => FormViewSubmittedNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewView::class => FormViewViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => ApiUserSourceUserSourceIdMovePatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => FormViewViewCoverImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => ApiUserSourceUserSourceIdMovePatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => FormViewViewLogoImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => FormulaFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => ApiUserAccountPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => FormulaFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => ApiUserChangePasswordPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => FormulaFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => ApiUserResetPasswordPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => FormulaFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => ApiUserScheduleAccountDeletionPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => FullHealthCheckNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => ApiUserSendResetPasswordEmailPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => GalleryViewCreateViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => ApiUserTokenAuthPostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => GalleryViewFieldOptionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => ApiUserTokenAuthPostResponse200UserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\GalleryViewView::class => GalleryViewViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => ApiUserTokenAuthPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => GenerateFormulaWithAIRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => ApiUserTokenRefreshPostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => GenerateFormulaWithAIResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => ApiUserTokenRefreshPostResponse200UserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => GeneratedConditionalColorCreateViewDecorationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => ApiUserTokenRefreshPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => ApiUserTokenVerifyPostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => GeneratedConditionalColorUpdateViewDecorationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => ApiUserTokenVerifyPostResponse200UserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => ApiUserTokenVerifyPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => GeneratedConditionalColorViewDecorationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => ApiUserVerifyEmailPostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => GeneratedConditionalColorViewDecorationValueProviderConfNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => ApiUserVerifyEmailPostResponse200UserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => GeneratedSingleSelectColorCreateViewDecorationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => ApiUserVerifyEmailPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => ApiUserVerifyEmailPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => GeneratedSingleSelectColorUpdateViewDecorationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => GeneratedSingleSelectColorViewDecorationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => ApiWorkspacesWorkspaceIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => ApiWorkspacesWorkspaceIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => GenerativeAISettingsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => GitHubAuthProviderModelAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => GitLabAuthProviderModelAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => GoogleAuthProviderModelAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => GridViewCreateViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => GridViewFieldOptionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GridViewFilter::class => GridViewFilterNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\GridViewView::class => GridViewViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => HeadingElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => HeadingElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => HeadingElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => HeadingElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => HeadingElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => HeadingElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => HeadingElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => HeadingElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => IFrameElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => IFrameElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => IFrameElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => IFrameElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => IFrameElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => IFrameElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => IFrameElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => IFrameElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => ImageConfigBlockNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => ImageConfigBlockImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => ImageElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => ImageElementCreateElementStyleBackgroundFileNormalizer::class, - \Jane\Component\JsonSchemaRuntime\Reference::class => \CedricZiel\Baserow\Generated\Runtime\Normalizer\ReferenceNormalizer::class, - ]; - protected $normalizersCache = []; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return array_key_exists($type, $this->normalizers); - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return is_object($data) && array_key_exists(get_class($data), $this->normalizers); - } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $normalizerClass = $this->normalizers[get_class($object)]; - $normalizer = $this->getNormalizer($normalizerClass); - - return $normalizer->normalize($object, $format, $context); - } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - $denormalizerClass = $this->normalizers[$type]; - $denormalizer = $this->getNormalizer($denormalizerClass); - - return $denormalizer->denormalize($data, $type, $format, $context); - } - - private function getNormalizer(string $normalizerClass) - { - return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); - } - - private function initNormalizer(string $normalizerClass) - { - $normalizer = new $normalizerClass(); - $normalizer->setNormalizer($this->normalizer); - $normalizer->setDenormalizer($this->denormalizer); - $this->normalizersCache[$normalizerClass] = $normalizer; - - return $normalizer; - } - - public function getSupportedTypes(?string $format = null): array - { - return [ - \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\AIFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\Account::class => false, - \CedricZiel\Baserow\Generated\Model\ActionScopes::class => false, - \CedricZiel\Baserow\Generated\Model\AdminDashboard::class => false, - \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => false, - \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLog::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogUser::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => false, - \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => false, - \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => false, - \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => false, - \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplication::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewView::class => false, - \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceOption::class => false, - \CedricZiel\Baserow\Generated\Model\Collaborator::class => false, - \CedricZiel\Baserow\Generated\Model\CollectionField::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => false, - \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => false, - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => false, - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => false, - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => false, - \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\CountFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatePage::class => false, - \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => false, - \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => false, - \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => false, - \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => false, - \CedricZiel\Baserow\Generated\Model\CreateViewSort::class => false, - \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => false, - \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => false, - \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => false, - \CedricZiel\Baserow\Generated\Model\Dashboard::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => false, - \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\DateFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateElement::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => false, - \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\DurationFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\Element::class => false, - \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\EmailFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => false, - \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => false, - \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => false, - \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => false, - \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => false, - \CedricZiel\Baserow\Generated\Model\RowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\ExportJob::class => false, - \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\Field::class => false, - \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewView::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => false, - \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\GalleryViewView::class => false, - \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => false, - \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => false, - \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewFilter::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewView::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => false, - \CedricZiel\Baserow\Generated\Model\InstanceId::class => false, - \CedricZiel\Baserow\Generated\Model\Job::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewView::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\License::class => false, - \CedricZiel\Baserow\Generated\Model\LicenseUser::class => false, - \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => false, - \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowValue::class => false, - \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => false, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LookupFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\NumberFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\OllamaSettings::class => false, - \CedricZiel\Baserow\Generated\Model\OpenAISettings::class => false, - \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => false, - \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => false, - \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => false, - \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\OrderApplications::class => false, - \CedricZiel\Baserow\Generated\Model\OrderDomains::class => false, - \CedricZiel\Baserow\Generated\Model\OrderPages::class => false, - \CedricZiel\Baserow\Generated\Model\OrderTables::class => false, - \CedricZiel\Baserow\Generated\Model\OrderViews::class => false, - \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => false, - \CedricZiel\Baserow\Generated\Model\Page::class => false, - \CedricZiel\Baserow\Generated\Model\PageParameterValue::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedAccount::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedSettings::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\PathParam::class => false, - \CedricZiel\Baserow\Generated\Model\PermissionObject::class => false, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\PublicBuilder::class => false, - \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => false, - \CedricZiel\Baserow\Generated\Model\PublicField::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormView::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => false, - \CedricZiel\Baserow\Generated\Model\PublicNone::class => false, - \CedricZiel\Baserow\Generated\Model\PublicPage::class => false, - \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PublicView::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewSort::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewTable::class => false, - \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\RatingFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\Register::class => false, - \CedricZiel\Baserow\Generated\Model\RegisterLicense::class => false, - \CedricZiel\Baserow\Generated\Model\RelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\Report::class => false, - \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => false, - \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\RollupFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\RowComment::class => false, - \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => false, - \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => false, - \CedricZiel\Baserow\Generated\Model\RowHistory::class => false, - \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => false, - \CedricZiel\Baserow\Generated\Model\RowMetadata::class => false, - \CedricZiel\Baserow\Generated\Model\SAMLResponse::class => false, - \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\SelectOption::class => false, - \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => false, - \CedricZiel\Baserow\Generated\Model\Sender::class => false, - \CedricZiel\Baserow\Generated\Model\Settings::class => false, - \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => false, - \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => false, - \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => false, - \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => false, - \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => false, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => false, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => false, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\Snapshot::class => false, - \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => false, - \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => false, - \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => false, - \CedricZiel\Baserow\Generated\Model\SubjectUser::class => false, - \CedricZiel\Baserow\Generated\Model\Table::class => false, - \CedricZiel\Baserow\Generated\Model\TableCreate::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TableImport::class => false, - \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhook::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => false, - \CedricZiel\Baserow\Generated\Model\Team::class => false, - \CedricZiel\Baserow\Generated\Model\TeamResponse::class => false, - \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => false, - \CedricZiel\Baserow\Generated\Model\TeamSubject::class => false, - \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => false, - \CedricZiel\Baserow\Generated\Model\Template::class => false, - \CedricZiel\Baserow\Generated\Model\TemplateCategories::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\TextFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\Token::class => false, - \CedricZiel\Baserow\Generated\Model\TokenPermissions::class => false, - \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => false, - \CedricZiel\Baserow\Generated\Model\TokenCreate::class => false, - \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => false, - \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => false, - \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => false, - \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => false, - \CedricZiel\Baserow\Generated\Model\TrashContents::class => false, - \CedricZiel\Baserow\Generated\Model\TrashStructure::class => false, - \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => false, - \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => false, - \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => false, - \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => false, - \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => false, - \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\URLFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => false, - \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => false, - \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => false, - \CedricZiel\Baserow\Generated\Model\User::class => false, - \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => false, - \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => false, - \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => false, - \CedricZiel\Baserow\Generated\Model\UserFile::class => false, - \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => false, - \CedricZiel\Baserow\Generated\Model\UserSourceUser::class => false, - \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => false, - \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => false, - \CedricZiel\Baserow\Generated\Model\View::class => false, - \CedricZiel\Baserow\Generated\Model\ViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\ViewFilter::class => false, - \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => false, - \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => false, - \CedricZiel\Baserow\Generated\Model\ViewSort::class => false, - \CedricZiel\Baserow\Generated\Model\Workspace::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => false, - \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => false, - \Jane\Component\JsonSchemaRuntime\Reference::class => false, - ]; - } - } -} else { - class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - protected $normalizers = [ - \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => AIFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AIFieldField::class => AIFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => AIFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => AIFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Account::class => AccountNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ActionScopes::class => ActionScopesNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AdminDashboard::class => AdminDashboardNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => AdminDashboardPerDayNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => AirtableImportJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => AirtableImportJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLog::class => AuditLogNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => AuditLogActionTypeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => AuditLogExportJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => AuditLogExportJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogUser::class => AuditLogUserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => AuditLogWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => AuthFormElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => AuthFormElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => AuthFormElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => AuthFormElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => AuthFormElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => AuthFormElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => AuthFormElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => AuthFormElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => AutonumberFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => AutonumberFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => AutonumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => AutonumberFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => BaseExporterOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => BaserowImpersonateAuthTokenNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => BatchCreateRoleAssignmentNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => BatchDeleteRowsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => BooleanFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => BooleanFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => BooleanFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => BooleanFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplication::class => BuilderApplicationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => BuilderApplicationGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => BuilderApplicationWorkspaceNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => BuilderApplicationThemeNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => BuilderApplicationFaviconFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => BuilderBaseApplicationCreatePolymorphicNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => BuilderBaseApplicationCreatePolymorphicFaviconFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => BuilderBaseApplicationUpdatePolymorphicNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => BuilderBaseApplicationUpdatePolymorphicFaviconFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => BuilderWorkflowActionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => ButtonConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => ButtonConfigBlockButtonNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => ButtonElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => ButtonElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => ButtonElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => ButtonElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => ButtonElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => ButtonElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => ButtonElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => ButtonElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => ButtonLinkConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => ButtonLinkConfigBlockButtonNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => ButtonLinkConfigBlockLinkNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => ButtonThemeConfigBlockNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => CalendarViewCreateViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => CalendarViewExampleResponseNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => CalendarViewExampleResponseStackNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => CalendarViewFieldOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CalendarViewView::class => CalendarViewViewNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => ChangePasswordBodyValidationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => CheckboxElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => CheckboxElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => CheckboxElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => CheckboxElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => CheckboxElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => CheckboxElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => CheckboxElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => CheckboxElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => ChoiceElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => ChoiceElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => ChoiceElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => ChoiceElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => ChoiceElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => ChoiceElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => ChoiceElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => ChoiceElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ChoiceOption::class => ChoiceOptionNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Collaborator::class => CollaboratorNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CollectionField::class => CollectionFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => ColumnElementCreateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => ColumnElementCreateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => ColumnElementElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => ColumnElementElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => ColumnElementPublicElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => ColumnElementPublicElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => ColumnElementUpdateElementNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => ColumnElementUpdateElementStyleBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => CombinedThemeConfigBlocksNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => CombinedThemeConfigBlocksPageBackgroundFileNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => ConditionalColorValueProviderConfColorNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => ConditionalColorValueProviderConfColorFilterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => ConditionalColorValueProviderConfColorFilterGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => ConditionalColorValueProviderConfColorsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => CountFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CountFieldField::class => CountFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => CountFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => CountFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatePage::class => CreatePageNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => CreateRoleAssignmentNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => CreateSnapshotJobCreateJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => CreateSnapshotJobJobNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => CreateViewFilterNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => CreateViewFilterGroupNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => CreateViewGroupByNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateViewSort::class => CreateViewSortNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => CreateWorkspaceInvitationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => CreatedByFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => CreatedByFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => CreatedByFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => CreatedByFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => CreatedOnFieldCreateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => CreatedOnFieldFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => CreatedOnFieldFieldSerializerWithRelatedFieldsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => CreatedOnFieldUpdateFieldNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => CsvExporterOptionsNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => CustomDomainCreateDomainNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => CustomDomainDomainNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\Dashboard::class => DashboardNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => DatabaseApplicationNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => DatabaseApplicationGroupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => ImageElementCreateElementImageFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => DatabaseApplicationWorkspaceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementElement::class => ImageElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => DatabaseBaseApplicationCreatePolymorphicNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => ImageElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => DatabaseBaseApplicationUpdatePolymorphicNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => ImageElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => DateFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => ImageElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DateFieldField::class => DateFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => ImageElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => DateFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => ImageElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => DateFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => ImageElementUpdateElementImageFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => DuplicateApplicationJobCreateJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => ImageThemeConfigBlockNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => DuplicateApplicationJobJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => InputTextElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateElement::class => DuplicateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => InputTextElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => DuplicateFieldJobCreateJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => InputTextElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => DuplicateFieldJobJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => InputTextElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => DuplicateFieldJobJobOriginalFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => InputTextElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => DuplicateFieldJobJobDuplicatedFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => InputTextElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => DuplicatePageJobCreateJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => InputTextElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => DuplicatePageJobJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => InputTextElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => DuplicatePageJobJobOriginalPageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => InstallTemplateJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => DuplicatePageJobJobDuplicatedPageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => InstallTemplateJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => DuplicateTableJobCreateJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => InstallTemplateJobJobWorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => DuplicateTableJobJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => InstallTemplateJobJobTemplateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => DuplicateTableJobJobOriginalTableNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => InstallTemplateJobJobGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => DuplicateTableJobJobDuplicatedTableNormalizer::class, + \CedricZiel\Baserow\Generated\Model\InstanceId::class => InstanceIdNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => DurationFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Job::class => JobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DurationFieldField::class => DurationFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => KanbanViewCreateViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => DurationFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => KanbanViewExampleResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => DurationFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => KanbanViewExampleResponseStackNormalizer::class, - \CedricZiel\Baserow\Generated\Model\Element::class => ElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => KanbanViewFieldOptionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => ElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\KanbanViewView::class => KanbanViewViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => EmailFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => LastModifiedByFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\EmailFieldField::class => EmailFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => LastModifiedByFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => EmailFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => EmailFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => LastModifiedByFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => EmailTesterRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => LastModifiedFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => EmailTesterResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => LastModifiedFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => BatchCreateRowRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => ExampleBatchRowsResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => LastModifiedFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => BatchUpdateRowNormalizer::class, + \CedricZiel\Baserow\Generated\Model\License::class => LicenseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => ExampleRowRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LicenseUser::class => LicenseUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => CreateRowRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => LicenseUserLookupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => ExampleRowResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => LicenseWithUsersNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => ExampleRowResponseField10Normalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => LinkElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => ExampleRowResponseField12Normalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => LinkElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => ExampleRowResponseField16Normalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkElementElement::class => LinkElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RowResponse::class => RowResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => LinkElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ExportJob::class => ExportJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => LinkElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => FacebookAuthProviderModelAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => LinkElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\Field::class => FieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => LinkElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => FieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => LinkElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => FileFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => LinkRowFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FileFieldField::class => FileFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => LinkRowFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => FileFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => FileFieldResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => LinkRowFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => FileFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkRowValue::class => LinkRowValueNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => FileImportJobCreateJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => LinkThemeConfigBlockNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => FileImportJobJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => ListWorkspaceUsersWithMemberDataNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => FileImportJobJobReportNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => LocalBaserowContextDataNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => FormContainerElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => FormContainerElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => FormContainerElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => FormContainerElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => LocalBaserowFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => FormContainerElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => LocalBaserowGetRowNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => FormContainerElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => LocalBaserowGetRowCreateDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => FormContainerElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => LocalBaserowGetRowDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => FormContainerElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => LocalBaserowGetRowPublicDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => FormViewCreateViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => LocalBaserowGetRowServiceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => FormViewCreateViewCoverImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => LocalBaserowGetRowUpdateDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => FormViewCreateViewLogoImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => LocalBaserowIntegrationCreateIntegrationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => FormViewFieldOptionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => LocalBaserowIntegrationCreateIntegrationContextDataNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => FormViewFieldOptionsConditionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => FormViewFieldOptionsConditionGroupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => LocalBaserowIntegrationIntegrationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => FormViewSubmittedNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => LocalBaserowIntegrationIntegrationContextDataNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewView::class => FormViewViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => FormViewViewCoverImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => LocalBaserowIntegrationUpdateIntegrationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => FormViewViewLogoImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => FormulaFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => FormulaFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => LocalBaserowListRowsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => FormulaFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => LocalBaserowListRowsCreateDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => FormulaFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => LocalBaserowListRowsDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => FullHealthCheckNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => LocalBaserowListRowsPublicDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => GalleryViewCreateViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => LocalBaserowListRowsServiceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => GalleryViewFieldOptionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => LocalBaserowListRowsUpdateDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GalleryViewView::class => GalleryViewViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => GenerateFormulaWithAIRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => GenerateFormulaWithAIResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => LocalBaserowTableServiceFieldMappingNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => GeneratedConditionalColorCreateViewDecorationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => LocalBaserowTableServiceFilterNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => GeneratedConditionalColorCreateViewDecorationValueProviderConfNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => LocalBaserowTableServiceSortNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => GeneratedConditionalColorUpdateViewDecorationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => GeneratedConditionalColorUpdateViewDecorationValueProviderConfNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => GeneratedConditionalColorViewDecorationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => GeneratedConditionalColorViewDecorationValueProviderConfNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => LocalBaserowUpsertRowNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => GeneratedSingleSelectColorCreateViewDecorationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => LocalBaserowUpsertRowCreateDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => GeneratedSingleSelectColorCreateViewDecorationValueProviderConfNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => LocalBaserowUpsertRowDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => GeneratedSingleSelectColorUpdateViewDecorationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => LocalBaserowUpsertRowPublicDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => GeneratedSingleSelectColorUpdateViewDecorationValueProviderConfNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => LocalBaserowUpsertRowServiceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => GeneratedSingleSelectColorViewDecorationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => LocalBaserowUpsertRowUpdateDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => GeneratedSingleSelectColorViewDecorationValueProviderConfNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => LocalBaserowUserSourceBasePublicUserSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => GenerativeAISettingsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => LocalBaserowUserSourceCreateUserSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => GitHubAuthProviderModelAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => LocalBaserowUserSourceUpdateUserSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => GitLabAuthProviderModelAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => LocalBaserowUserSourceUserSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => GoogleAuthProviderModelAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => LocalBaserowUserSourceUserSourceRolesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => GridViewCreateViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => LocalBaserowViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => GridViewFieldOptionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => LogoutWorkflowActionBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GridViewFilter::class => GridViewFilterNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\GridViewView::class => GridViewViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => HeadingElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => LongTextFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => HeadingElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => LongTextFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => HeadingElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => LongTextFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => HeadingElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => LongTextFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => HeadingElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => LookupFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => HeadingElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LookupFieldField::class => LookupFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => HeadingElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => LookupFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => HeadingElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => LookupFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => IFrameElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => MultipleCollaboratorsFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => IFrameElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => MultipleCollaboratorsFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => IFrameElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => IFrameElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => MultipleCollaboratorsFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => IFrameElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => MultipleSelectFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => IFrameElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => MultipleSelectFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => IFrameElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => IFrameElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => MultipleSelectFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => ImageConfigBlockNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => NotificationRecipientNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => ImageConfigBlockImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => NotificationRecipientSenderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => ImageElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => NotificationWorkflowActionBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => ImageElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => ImageElementCreateElementImageFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementElement::class => ImageElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => NumberFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => ImageElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NumberFieldField::class => NumberFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => ImageElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => NumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => ImageElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => NumberFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => ImageElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OllamaSettings::class => OllamaSettingsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => ImageElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OpenAISettings::class => OpenAISettingsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => ImageElementUpdateElementImageFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => OpenApiRoleAssignmentNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => ImageThemeConfigBlockNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => OpenApiRoleAssignmentSubjectNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => InputTextElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => OpenApiSubjectFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => InputTextElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => OpenIdConnectAuthProviderModelAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => InputTextElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => OpenPageWorkflowActionBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => InputTextElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => InputTextElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => InputTextElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OrderApplications::class => OrderApplicationsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => InputTextElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OrderDomains::class => OrderDomainsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => InputTextElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OrderPages::class => OrderPagesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => InstallTemplateJobCreateJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OrderTables::class => OrderTablesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => InstallTemplateJobJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OrderViews::class => OrderViewsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => InstallTemplateJobJobWorkspaceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => OrderWorkflowActionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => InstallTemplateJobJobTemplateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => OrderWorkspacesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => InstallTemplateJobJobGroupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Page::class => PageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\InstanceId::class => InstanceIdNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PageParameterValue::class => PageParameterValueNormalizer::class, - \CedricZiel\Baserow\Generated\Model\Job::class => JobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => PaginationSerializerAuditLogNormalizer::class, - \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => KanbanViewCreateViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => PaginationSerializerAuditLogUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => KanbanViewExampleResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => PaginationSerializerAuditLogWorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => KanbanViewExampleResponseStackNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => PaginationRowResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => KanbanViewFieldOptionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => PaginationSerializerLicenseUserLookupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\KanbanViewView::class => KanbanViewViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => PaginationSerializerLinkRowValueNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => LastModifiedByFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => PaginationSerializerNotificationRecipientNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => LastModifiedByFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => PaginationSerializerRowCommentNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => PaginationSerializerRowHistoryNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => LastModifiedByFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => PaginationSerializerTrashContentsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => LastModifiedFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => PaginationSerializerUserAdminResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => LastModifiedFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => LastModifiedFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => PaginationSerializerWorkspacesAdminResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\License::class => LicenseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => PasswordAuthProviderModelAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LicenseUser::class => LicenseUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => PasswordFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => LicenseUserLookupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => PasswordFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => LicenseWithUsersNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => PasswordFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => LinkElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => PasswordFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => LinkElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedAccount::class => PatchedAccountNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkElementElement::class => LinkElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => PatchedCombinedThemeConfigBlocksNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => LinkElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => LinkElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => PatchRowsRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => LinkElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => PatchRowRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => LinkElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => PatchedGenerativeAISettingsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => LinkElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => PatchedMoveDataSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => LinkRowFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => PatchedMoveElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => LinkRowFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => PatchedMoveIntegrationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => PatchedMoveUserSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => LinkRowFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedSettings::class => PatchedSettingsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkRowValue::class => LinkRowValueNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => PatchedSettingsCoBrandingLogoNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => LinkThemeConfigBlockNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => PatchedTableUpdateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => ListWorkspaceUsersWithMemberDataNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => PatchedTableWebhookUpdateRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => LocalBaserowContextDataNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => PatchedTokenUpdateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => PatchedTokenUpdatePermissionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => PatchedTrashEntryRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => PatchedUndoRedoRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => LocalBaserowFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => PatchedUndoRedoRequestScopesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => LocalBaserowGetRowNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => PatchedUpdateDomainNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => LocalBaserowGetRowCreateDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => PatchedUpdatePageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => LocalBaserowGetRowDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => PatchedUpdatePremiumViewAttributesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => LocalBaserowGetRowPublicDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => PatchedUpdateViewFilterNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => LocalBaserowGetRowServiceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => PatchedUpdateViewFilterGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => LocalBaserowGetRowUpdateDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => PatchedUpdateViewGroupByNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => LocalBaserowIntegrationCreateIntegrationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => PatchedUpdateViewSortNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => LocalBaserowIntegrationCreateIntegrationContextDataNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => PatchedUpdateWorkspaceInvitationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => PatchedUpdateWorkspaceUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => LocalBaserowIntegrationIntegrationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => PatchedUserAdminUpdateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => LocalBaserowIntegrationIntegrationContextDataNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => PatchedWorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PathParam::class => PathParamNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => LocalBaserowIntegrationUpdateIntegrationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PermissionObject::class => PermissionObjectNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => PhoneNumberFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => PhoneNumberFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => LocalBaserowListRowsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => LocalBaserowListRowsCreateDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => PhoneNumberFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => LocalBaserowListRowsDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicBuilder::class => PublicBuilderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => LocalBaserowListRowsPublicDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => PublicBuilderThemeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => LocalBaserowListRowsServiceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicField::class => PublicFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => LocalBaserowListRowsUpdateDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicFormView::class => PublicFormViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => PublicFormViewCoverImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => PublicFormViewLogoImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => LocalBaserowTableServiceFieldMappingNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => PublicFormViewFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => LocalBaserowTableServiceFilterNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => PublicFormViewFieldOptionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => LocalBaserowTableServiceSortNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => PublicFormViewFieldOptionsFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicNone::class => PublicNoneNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicPage::class => PublicPageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => LocalBaserowUpsertRowNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => LocalBaserowUpsertRowCreateDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicView::class => PublicViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => LocalBaserowUpsertRowDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => PublicViewAuthRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => LocalBaserowUpsertRowPublicDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => PublicViewAuthResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => LocalBaserowUpsertRowServiceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => PublicViewGroupByNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => LocalBaserowUpsertRowUpdateDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => PublicViewInfoNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => LocalBaserowUserSourceBasePublicUserSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => PublicViewInfoViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => LocalBaserowUserSourceCreateUserSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicViewSort::class => PublicViewSortNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => LocalBaserowUserSourceUpdateUserSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublicViewTable::class => PublicViewTableNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => LocalBaserowUserSourceUserSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => PublishDomainJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => LocalBaserowUserSourceUserSourceRolesNormalizer::class, + \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => PublishDomainJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => LocalBaserowViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => RatingFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => LogoutWorkflowActionBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RatingFieldField::class => RatingFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => RatingFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => RatingFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => LongTextFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => LongTextFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => LongTextFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => LongTextFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Register::class => RegisterNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => LookupFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RegisterLicense::class => RegisterLicenseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LookupFieldField::class => LookupFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RelatedFields::class => RelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => LookupFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => RepeatElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => LookupFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => RepeatElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => MultipleCollaboratorsFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => RepeatElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => MultipleCollaboratorsFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => RepeatElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => RepeatElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => MultipleCollaboratorsFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => RepeatElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => MultipleSelectFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => RepeatElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => MultipleSelectFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => RepeatElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Report::class => ReportNormalizer::class, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => MultipleSelectFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => ResetPasswordBodyValidationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => NotificationRecipientNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => RestoreSnapshotJobCreateJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => NotificationRecipientSenderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => RestoreSnapshotJobJobNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => NotificationWorkflowActionBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => RollupFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RollupFieldField::class => RollupFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => RollupFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => NumberFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => RollupFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NumberFieldField::class => NumberFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RowComment::class => RowCommentNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => NumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => RowCommentCreateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => NumberFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => RowCommentsNotificationModeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OllamaSettings::class => OllamaSettingsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RowHistory::class => RowHistoryNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OpenAISettings::class => OpenAISettingsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => RowHistoryUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => OpenApiRoleAssignmentNormalizer::class, + \CedricZiel\Baserow\Generated\Model\RowMetadata::class => RowMetadataNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => OpenApiRoleAssignmentSubjectNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SAMLResponse::class => SAMLResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => OpenApiSubjectFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => SamlAuthProviderModelAuthProviderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => OpenIdConnectAuthProviderModelAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => SelectColorValueProviderConfNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => OpenPageWorkflowActionBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SelectOption::class => SelectOptionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => SendResetPasswordEmailBodyValidationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Sender::class => SenderNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OrderApplications::class => OrderApplicationsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Settings::class => SettingsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OrderDomains::class => OrderDomainsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => SettingsCoBrandingLogoNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OrderPages::class => OrderPagesNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => SingleAuditLogExportJobRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OrderTables::class => OrderTablesNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => SingleAuditLogExportJobResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OrderViews::class => OrderViewsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => SingleDuplicateApplicationJobTypeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => OrderWorkflowActionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => SingleDuplicateFieldJobTypeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => OrderWorkspacesNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => SingleDuplicateFieldJobTypeOriginalFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\Page::class => PageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PageParameterValue::class => PageParameterValueNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => SingleDuplicatePageJobTypeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => PaginationSerializerAuditLogNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => SingleDuplicatePageJobTypeOriginalPageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => PaginationSerializerAuditLogUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => SingleDuplicatePageJobTypeDuplicatedPageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => PaginationSerializerAuditLogWorkspaceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => SingleDuplicateTableJobTypeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => PaginationRowResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => SingleDuplicateTableJobTypeOriginalTableNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => PaginationSerializerLicenseUserLookupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => SingleDuplicateTableJobTypeDuplicatedTableNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => PaginationSerializerLinkRowValueNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => SingleFileImportJobSerializerClassNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => PaginationSerializerNotificationRecipientNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => SingleFileImportJobSerializerClassReportNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => PaginationSerializerRowCommentNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => SingleInstallTemplateJobTypeNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => PaginationSerializerRowHistoryNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => SingleInstallTemplateJobTypeWorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => PaginationSerializerTrashContentsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => SingleInstallTemplateJobTypeTemplateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => PaginationSerializerUserAdminResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => SingleInstallTemplateJobTypeGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => SingleSelectFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => SingleSelectFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => PaginationSerializerWorkspacesAdminResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => PasswordAuthProviderModelAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => SingleSelectFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => PasswordFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Snapshot::class => SnapshotNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => PasswordFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => SnapshotCreatedByNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => PasswordFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => SubDomainCreateDomainNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => PasswordFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => SubDomainDomainNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedAccount::class => PatchedAccountNormalizer::class, + \CedricZiel\Baserow\Generated\Model\SubjectUser::class => SubjectUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => PatchedCombinedThemeConfigBlocksNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Table::class => TableNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableCreate::class => TableCreateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => PatchRowsRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => TableElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => PatchRowRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => TableElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => PatchedGenerativeAISettingsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableElementElement::class => TableElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => PatchedMoveDataSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => TableElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => PatchedMoveElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => TableElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => PatchedMoveIntegrationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => TableElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => PatchedMoveUserSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => TableElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedSettings::class => PatchedSettingsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => TableElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => PatchedSettingsCoBrandingLogoNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableImport::class => TableImportNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => PatchedTableUpdateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => TableSerializerWithFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => PatchedTableWebhookUpdateRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableWebhook::class => TableWebhookNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => PatchedTokenUpdateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => TableWebhookCallNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => PatchedTokenUpdatePermissionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => TableWebhookCreateRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => PatchedTrashEntryRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => TableWebhookTestCallRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => PatchedUndoRedoRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => TableWebhookTestCallResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => PatchedUndoRedoRequestScopesNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Team::class => TeamNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => PatchedUpdateDomainNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TeamResponse::class => TeamResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => PatchedUpdatePageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => TeamSampleSubjectNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => PatchedUpdatePremiumViewAttributesNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TeamSubject::class => TeamSubjectNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => PatchedUpdateViewFilterNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => TeamSubjectResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => PatchedUpdateViewFilterGroupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Template::class => TemplateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => PatchedUpdateViewGroupByNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TemplateCategories::class => TemplateCategoriesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => PatchedUpdateViewSortNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => TextElementCreateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => PatchedUpdateWorkspaceInvitationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => TextElementCreateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => PatchedUpdateWorkspaceUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextElementElement::class => TextElementElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => PatchedUserAdminUpdateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => TextElementElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => PatchedWorkspaceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => TextElementPublicElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PathParam::class => PathParamNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => TextElementPublicElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PermissionObject::class => PermissionObjectNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => TextElementUpdateElementNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => PhoneNumberFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => TextElementUpdateElementStyleBackgroundFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => PhoneNumberFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => TextFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextFieldField::class => TextFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => PhoneNumberFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => TextFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicBuilder::class => PublicBuilderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => TextFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => PublicBuilderThemeNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Token::class => TokenNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicField::class => PublicFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TokenPermissions::class => TokenPermissionsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicFormView::class => PublicFormViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => TokenBlacklistNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => PublicFormViewCoverImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TokenCreate::class => TokenCreateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => PublicFormViewLogoImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => TokenObtainPairNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => PublicFormViewFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => TokenObtainPairWithUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => PublicFormViewFieldOptionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => TokenRefreshWithUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => PublicFormViewFieldOptionsFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => TokenVerifyWithUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicNone::class => PublicNoneNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TrashContents::class => TrashContentsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicPage::class => PublicPageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TrashStructure::class => TrashStructureNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => TrashStructureApplicationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => TrashStructureGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicView::class => PublicViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => TypeFormulaRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => PublicViewAuthRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => TypeFormulaResultNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => PublicViewAuthResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => TypographyConfigBlockNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => PublicViewGroupByNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => TypographyConfigBlockTypographyNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => PublicViewInfoNormalizer::class, + \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => TypographyThemeConfigBlockNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => PublicViewInfoViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => URLFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicViewSort::class => PublicViewSortNormalizer::class, + \CedricZiel\Baserow\Generated\Model\URLFieldField::class => URLFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublicViewTable::class => PublicViewTableNormalizer::class, + \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => URLFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => PublishDomainJobCreateJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => URLFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => PublishDomainJobJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => UUIDFieldCreateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => RatingFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => UUIDFieldFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RatingFieldField::class => RatingFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => UUIDFieldFieldSerializerWithRelatedFieldsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => RatingFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => UUIDFieldUpdateFieldNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => RatingFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => UndoRedoActionNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => UndoRedoResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => UniqueRowValuesNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\User::class => UserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\Register::class => RegisterNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => UserAdminCreateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RegisterLicense::class => RegisterLicenseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => UserAdminGroupsNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RelatedFields::class => RelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => UserAdminResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => RepeatElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UserFile::class => UserFileNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => RepeatElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => UserFileUploadViaURLRequestNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => RepeatElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UserSourceUser::class => UserSourceUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => RepeatElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => UserWorkspaceInvitationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => RepeatElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => UsersPerUserSourceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => RepeatElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => VerifyEmailAddressNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => RepeatElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\View::class => ViewNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => RepeatElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ViewDecoration::class => ViewDecorationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\Report::class => ReportNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ViewFilter::class => ViewFilterNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => ResetPasswordBodyValidationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => ViewFilterGroupNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => RestoreSnapshotJobCreateJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => ViewGroupByNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => RestoreSnapshotJobJobNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ViewSort::class => ViewSortNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => RollupFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\Workspace::class => WorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RollupFieldField::class => RollupFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => WorkspaceAdminUsersNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => RollupFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => WorkspaceInvitationNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => RollupFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => WorkspaceUserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RowComment::class => RowCommentNormalizer::class, + \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => WorkspaceUserEnterpriseTeamNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => RowCommentCreateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => WorkspaceUserWorkspaceNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => RowCommentsNotificationModeNormalizer::class, + \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => WorkspacesAdminResponseNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RowHistory::class => RowHistoryNormalizer::class, + \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => CalendarViewUpdateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => RowHistoryUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => FormViewUpdateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\RowMetadata::class => RowMetadataNormalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => FormViewUpdateCoverImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\SAMLResponse::class => SAMLResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => FormViewUpdateLogoImageNormalizer::class, - \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => SamlAuthProviderModelAuthProviderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => GalleryViewUpdateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => SelectColorValueProviderConfNormalizer::class, + \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => GridViewUpdateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\SelectOption::class => SelectOptionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => KanbanViewUpdateNormalizer::class, - \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => SendResetPasswordEmailBodyValidationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => ApiHealthEmailPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\Sender::class => SenderNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => ApiAdminAuditLogGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\Settings::class => SettingsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => ApiAdminAuditLogActionTypesGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => SettingsCoBrandingLogoNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => ApiAdminAuditLogExportPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => SingleAuditLogExportJobRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => ApiAdminAuditLogExportPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => SingleAuditLogExportJobResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => ApiAdminAuditLogUsersGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => SingleDuplicateApplicationJobTypeNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => ApiAdminAuditLogWorkspacesGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => SingleDuplicateFieldJobTypeNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => ApiAdminAuthProviderPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => SingleDuplicateFieldJobTypeOriginalFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => SingleDuplicatePageJobTypeNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => SingleDuplicatePageJobTypeOriginalPageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => SingleDuplicatePageJobTypeDuplicatedPageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => ApiAdminGroupsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => SingleDuplicateTableJobTypeNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => ApiAdminGroupsGroupIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => SingleDuplicateTableJobTypeOriginalTableNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => ApiAdminUsersGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => SingleDuplicateTableJobTypeDuplicatedTableNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => ApiAdminUsersPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => SingleFileImportJobSerializerClassNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => ApiAdminUsersUserIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => SingleFileImportJobSerializerClassReportNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => ApiAdminUsersUserIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => SingleInstallTemplateJobTypeNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => ApiAdminUsersImpersonatePostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => SingleInstallTemplateJobTypeWorkspaceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => ApiAdminUsersImpersonatePostResponse200UserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => SingleInstallTemplateJobTypeTemplateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => ApiAdminWorkspacesGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => SingleInstallTemplateJobTypeGroupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => SingleSelectFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => SingleSelectFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => SingleSelectFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\Snapshot::class => SnapshotNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => SnapshotCreatedByNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => SubDomainCreateDomainNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => SubDomainDomainNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\SubjectUser::class => SubjectUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => ApiApplicationsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\Table::class => TableNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => ApiApplicationsApplicationIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableCreate::class => TableCreateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => ApiApplicationsApplicationIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => TableElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => ApiApplicationsApplicationIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => TableElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => ApiApplicationsApplicationIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableElementElement::class => TableElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => ApiApplicationsApplicationIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => TableElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => ApiApplicationsApplicationIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => TableElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => TableElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => TableElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => ApiApplicationsGroupGroupIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => TableElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => ApiApplicationsGroupGroupIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableImport::class => TableImportNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => ApiApplicationsGroupGroupIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => TableSerializerWithFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => ApiApplicationsGroupGroupIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableWebhook::class => TableWebhookNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => TableWebhookCallNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => TableWebhookCreateRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => TableWebhookTestCallRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => TableWebhookTestCallResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\Team::class => TeamNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TeamResponse::class => TeamResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => TeamSampleSubjectNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TeamSubject::class => TeamSubjectNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => ApiAuditLogGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => TeamSubjectResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => ApiAuditLogActionTypesGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\Template::class => TemplateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => ApiAuditLogExportPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TemplateCategories::class => TemplateCategoriesNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => ApiAuditLogExportPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => TextElementCreateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => ApiAuditLogUsersGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => TextElementCreateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => ApiAuditLogWorkspacesGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextElementElement::class => TextElementElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => ApiBuilderBuilderIdDomainsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => TextElementElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => ApiBuilderBuilderIdDomainsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => TextElementPublicElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => ApiBuilderBuilderIdDomainsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => TextElementPublicElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => ApiBuilderBuilderIdDomainsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => TextElementUpdateElementNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => TextElementUpdateElementStyleBackgroundFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => TextFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => ApiBuilderBuilderIdPagesPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextFieldField::class => TextFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => ApiBuilderBuilderIdPagesPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => TextFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => TextFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\Token::class => TokenNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => ApiBuilderBuilderIdThemePatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TokenPermissions::class => TokenPermissionsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => ApiBuilderBuilderIdThemePatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => TokenBlacklistNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TokenCreate::class => TokenCreateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => TokenObtainPairNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => TokenObtainPairWithUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => TokenRefreshWithUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => TokenVerifyWithUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TrashContents::class => TrashContentsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TrashStructure::class => TrashStructureNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => ApiBuilderDomainsDomainIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => TrashStructureApplicationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => ApiBuilderDomainsDomainIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => TrashStructureGroupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => ApiBuilderDomainsDomainIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => TypeFormulaRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => ApiBuilderDomainsDomainIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => TypeFormulaResultNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => TypographyConfigBlockNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => TypographyConfigBlockTypographyNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => TypographyThemeConfigBlockNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => URLFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\URLFieldField::class => URLFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => URLFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => URLFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => ApiBuilderElementElementIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => UUIDFieldCreateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => ApiBuilderElementElementIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => UUIDFieldFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => ApiBuilderElementElementIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => UUIDFieldFieldSerializerWithRelatedFieldsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => ApiBuilderElementElementIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => UUIDFieldUpdateFieldNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => ApiBuilderElementElementIdDuplicatePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => UndoRedoActionNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => ApiBuilderElementElementIdDuplicatePostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => UndoRedoResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => ApiBuilderElementElementIdMovePatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => UniqueRowValuesNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => ApiBuilderElementElementIdMovePatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\User::class => UserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => UserAdminCreateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => UserAdminGroupsNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => UserAdminResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UserFile::class => UserFileNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => ApiBuilderPagePageIdElementsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => UserFileUploadViaURLRequestNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => ApiBuilderPagePageIdElementsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UserSourceUser::class => UserSourceUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => ApiBuilderPagePageIdElementsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => UserWorkspaceInvitationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => UsersPerUserSourceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => VerifyEmailAddressNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\View::class => ViewNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ViewDecoration::class => ViewDecorationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ViewFilter::class => ViewFilterNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => ApiBuilderPagesPageIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => ViewFilterGroupNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => ApiBuilderPagesPageIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => ViewGroupByNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => ApiBuilderPagesPageIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ViewSort::class => ViewSortNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => ApiBuilderPagesPageIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\Workspace::class => WorkspaceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => WorkspaceAdminUsersNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => WorkspaceInvitationNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => WorkspaceUserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => WorkspaceUserEnterpriseTeamNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => WorkspaceUserWorkspaceNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => WorkspacesAdminResponseNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => CalendarViewUpdateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => ApiDatabaseExportJobIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => FormViewUpdateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => ApiDatabaseExportTableTableIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => FormViewUpdateCoverImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => ApiDatabaseExportTableTableIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => FormViewUpdateLogoImageNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => GalleryViewUpdateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => GridViewUpdateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => ApiDatabaseFieldsFieldIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => KanbanViewUpdateNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => ApiDatabaseFieldsFieldIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => ApiHealthEmailPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => ApiDatabaseFieldsFieldIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => ApiAdminAuditLogGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => ApiDatabaseFieldsFieldIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => ApiAdminAuditLogActionTypesGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => ApiAdminAuditLogExportPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => ApiAdminAuditLogExportPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => ApiAdminAuditLogUsersGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => ApiAdminAuditLogWorkspacesGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => ApiAdminAuthProviderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => ApiAdminAuthProviderAuthProviderIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => ApiDatabaseFieldsTableTableIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => ApiAdminAuthProviderAuthProviderIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => ApiDatabaseFieldsTableTableIdGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => ApiAdminAuthProviderAuthProviderIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => ApiDatabaseFieldsTableTableIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => ApiAdminAuthProviderAuthProviderIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => ApiDatabaseFieldsTableTableIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => ApiAdminGroupsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => ApiDatabaseFieldsTableTableIdPostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => ApiAdminGroupsGroupIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => ApiDatabaseFieldsTableTableIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => ApiAdminUsersGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => ApiAdminUsersPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => ApiAdminUsersUserIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => ApiDatabaseFormulaTableIdTypePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => ApiAdminUsersUserIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => ApiDatabaseFormulaTableIdTypePostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => ApiAdminUsersImpersonatePostResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => ApiDatabaseRowsNamesGetResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => ApiAdminUsersImpersonatePostResponse200UserNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => ApiDatabaseRowsNamesGetResponse200TableIdNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => ApiAdminWorkspacesGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => ApiDatabaseRowsNamesGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => ApiAdminWorkspacesWorkspaceIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => ApiDatabaseRowsNamesGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => ApiApplicationApplicationIdIntegrationsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => ApiDatabaseRowsNamesGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => ApiApplicationApplicationIdIntegrationsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => ApiDatabaseRowsTableTableIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => ApiApplicationApplicationIdIntegrationsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => ApiDatabaseRowsTableTableIdGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => ApiApplicationApplicationIdListUserSourceUsersGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => ApiDatabaseRowsTableTableIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => ApiApplicationApplicationIdUserSourcesGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => ApiDatabaseRowsTableTableIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => ApiApplicationApplicationIdUserSourcesPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => ApiDatabaseRowsTableTableIdPostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => ApiApplicationApplicationIdUserSourcesPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => ApiDatabaseRowsTableTableIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => ApiApplicationApplicationIdUserSourcesRolesGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => ApiApplicationsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => ApiApplicationsApplicationIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => ApiApplicationsApplicationIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => ApiApplicationsApplicationIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => ApiApplicationsApplicationIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => ApiApplicationsApplicationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => ApiApplicationsApplicationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => ApiApplicationsApplicationIdDuplicateAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => ApiApplicationsApplicationIdDuplicateAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => ApiApplicationsGroupGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => ApiApplicationsGroupGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => ApiApplicationsGroupGroupIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => ApiApplicationsGroupGroupIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => ApiApplicationsGroupGroupIdOrderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => ApiApplicationsGroupGroupIdOrderPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => ApiApplicationsWorkspaceWorkspaceIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => ApiApplicationsWorkspaceWorkspaceIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => ApiApplicationsWorkspaceWorkspaceIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => ApiApplicationsWorkspaceWorkspaceIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => ApiAuditLogGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => ApiAuditLogActionTypesGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => ApiDatabaseTablesTableIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => ApiAuditLogExportPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => ApiDatabaseTablesTableIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => ApiAuditLogExportPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => ApiDatabaseTablesTableIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => ApiAuditLogUsersGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => ApiDatabaseTablesTableIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => ApiAuditLogWorkspacesGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => ApiDatabaseTablesTableIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => ApiBuilderBuilderIdDomainsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => ApiDatabaseTablesTableIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => ApiBuilderBuilderIdDomainsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => ApiBuilderBuilderIdDomainsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => ApiBuilderBuilderIdDomainsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => ApiBuilderBuilderIdDomainsOrderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => ApiBuilderBuilderIdDomainsOrderPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => ApiBuilderBuilderIdPagesPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => ApiBuilderBuilderIdPagesPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => ApiBuilderBuilderIdPagesOrderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => ApiBuilderBuilderIdPagesOrderPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => ApiBuilderBuilderIdThemePatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => ApiBuilderBuilderIdThemePatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => ApiBuilderDataSourceDataSourceIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => ApiBuilderDataSourceDataSourceIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => ApiDatabaseTokensPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => ApiBuilderDataSourceDataSourceIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => ApiDatabaseTokensTokenIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => ApiBuilderDataSourceDataSourceIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => ApiDatabaseTokensTokenIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => ApiBuilderDataSourceDataSourceIdDispatchPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => ApiDatabaseTokensTokenIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => ApiBuilderDataSourceDataSourceIdMovePatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => ApiDatabaseTokensTokenIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => ApiBuilderDataSourceDataSourceIdMovePatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => ApiDatabaseTokensTokenIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => ApiBuilderDomainsDomainIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => ApiDatabaseTokensTokenIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => ApiBuilderDomainsDomainIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => ApiDatabaseTokensCheckGetResponse403Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => ApiBuilderDomainsDomainIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => ApiBuilderDomainsDomainIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => ApiBuilderDomainsDomainIdPublishAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => ApiBuilderDomainsDomainIdPublishAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => ApiBuilderDomainsPublishedByNameDomainNameGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => ApiDatabaseViewsViewIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => ApiBuilderElementElementIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => ApiDatabaseViewsViewIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => ApiBuilderElementElementIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => ApiDatabaseViewsViewIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => ApiBuilderElementElementIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => ApiDatabaseViewsViewIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => ApiBuilderElementElementIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => ApiDatabaseViewsViewIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => ApiBuilderElementElementIdDuplicatePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => ApiDatabaseViewsViewIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => ApiBuilderElementElementIdDuplicatePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => ApiBuilderElementElementIdMovePatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => ApiBuilderElementElementIdMovePatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => ApiBuilderPagePageIdDataSourcesGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => ApiBuilderPagePageIdDataSourcesPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => ApiBuilderPagePageIdDataSourcesPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => ApiBuilderPagePageIdDispatchDataSourcesPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => ApiBuilderPagePageIdElementsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => ApiBuilderPagePageIdElementsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => ApiBuilderPagePageIdElementsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => ApiBuilderPagePageIdWorkflowActionsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => ApiBuilderPagePageIdWorkflowActionsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => ApiBuilderPagePageIdWorkflowActionsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => ApiBuilderPagesPageIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => ApiBuilderPagesPageIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => ApiBuilderPagesPageIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => ApiBuilderPagesPageIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => ApiBuilderPagesPageIdDuplicateAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => ApiBuilderPagesPageIdDuplicateAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => ApiDatabaseExportJobIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => ApiDatabaseExportTableTableIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => ApiDatabaseExportTableTableIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => ApiDatabaseFieldsFieldIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => ApiDatabaseFieldsFieldIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => ApiDatabaseFieldsFieldIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => ApiDatabaseFieldsFieldIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => ApiDatabaseFieldsFieldIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => ApiDatabaseFieldsFieldIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => ApiDatabaseFieldsTableTableIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => ApiDatabaseFieldsTableTableIdGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => ApiDatabaseFieldsTableTableIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => ApiDatabaseFieldsTableTableIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => ApiDatabaseFieldsTableTableIdPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => ApiDatabaseFieldsTableTableIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => ApiDatabaseFormulaTableIdTypePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => ApiDatabaseFormulaTableIdTypePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => ApiDatabaseRowsNamesGetResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => ApiDatabaseRowsNamesGetResponse200TableIdNormalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => ApiDatabaseRowsNamesGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => ApiDatabaseRowsNamesGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => ApiDatabaseRowsNamesGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => ApiDatabaseRowsTableTableIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => ApiDatabaseRowsTableTableIdGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => ApiDatabaseRowsTableTableIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => ApiDatabaseRowsTableTableIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => ApiDatabaseRowsTableTableIdPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => ApiDatabaseRowsTableTableIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => ApiDatabaseRowsTableTableIdRowIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => ApiDatabaseRowsTableTableIdRowIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => ApiDatabaseRowsTableTableIdRowIdGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => ApiDatabaseViewsGridViewIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => ApiDatabaseRowsTableTableIdRowIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => ApiDatabaseViewsGridViewIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => ApiDatabaseViewsGridViewIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => ApiDatabaseViewsGridViewIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => ApiDatabaseRowsTableTableIdBatchPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => ApiDatabaseRowsTableTableIdBatchPatchResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => ApiDatabaseRowsTableTableIdBatchPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => ApiDatabaseRowsTableTableIdBatchPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => ApiDatabaseRowsTableTableIdBatchPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => ApiDatabaseRowsTableTableIdBatchPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => ApiDatabaseRowsTableTableIdBatchDeletePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => ApiDatabaseRowsTableTableIdBatchDeletePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => ApiDatabaseTablesTableIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => ApiDatabaseTablesTableIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => ApiDatabaseTablesTableIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => ApiDatabaseTablesTableIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => ApiDatabaseTablesTableIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => ApiDatabaseTablesTableIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => ApiDatabaseTablesTableIdImportAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => ApiDatabaseTablesTableIdImportAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => ApiDatabaseViewsTableTableIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => ApiDatabaseViewsTableTableIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => ApiDatabaseViewsTableTableIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => ApiDatabaseViewsTableTableIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => ApiDatabaseTokensPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => ApiDatabaseTokensTokenIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => ApiDatabaseTokensTokenIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => ApiDatabaseTokensTokenIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => ApiDatabaseTokensTokenIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => ApiDatabaseTokensTokenIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => ApiDatabaseTokensTokenIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => ApiDatabaseTokensCheckGetResponse403Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => ApiDatabaseViewViewIdPremiumPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => ApiDatabaseViewViewIdPremiumPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => ApiFilesSignedDataGetResponse403Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => ApiGroupsGroupIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => ApiDatabaseViewsSlugPublicAuthPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => ApiGroupsGroupIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => ApiDatabaseViewsSlugPublicInfoGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => ApiGroupsGroupIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => ApiDatabaseViewsSlugPublicInfoGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => ApiGroupsGroupIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => ApiDatabaseViewsSlugPublicInfoGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => ApiGroupsGroupIdLeavePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => ApiDatabaseViewsViewIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => ApiGroupsGroupIdLeavePostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => ApiDatabaseViewsViewIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => ApiGroupsGroupIdPermissionsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => ApiDatabaseViewsViewIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => ApiDatabaseViewsViewIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => ApiDatabaseViewsViewIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => ApiDatabaseViewsViewIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => ApiDatabaseViewsViewIdDecorationsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => ApiDatabaseViewsViewIdDecorationsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => ApiDatabaseViewsViewIdDecorationsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => ApiDatabaseViewsViewIdDecorationsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => ApiDatabaseViewsViewIdDuplicatePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => ApiDatabaseViewsViewIdDuplicatePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => ApiDatabaseViewsViewIdFieldOptionsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => ApiDatabaseViewsViewIdFieldOptionsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => ApiDatabaseViewsViewIdFieldOptionsPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => ApiDatabaseViewsViewIdFieldOptionsPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => ApiDatabaseViewsViewIdFilterGroupsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => ApiGroupsInvitationsTokenTokenGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => ApiDatabaseViewsViewIdFilterGroupsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => ApiGroupsInvitationsTokenTokenGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => ApiDatabaseViewsViewIdFiltersGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => ApiDatabaseViewsViewIdFiltersGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => ApiDatabaseViewsViewIdFiltersPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => ApiGroupsUsersGroupUserIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => ApiDatabaseViewsViewIdFiltersPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => ApiGroupsUsersGroupUserIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => ApiDatabaseViewsViewIdGroupBysGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => ApiGroupsUsersGroupGroupIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => ApiDatabaseViewsViewIdGroupBysGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => ApiGroupsUsersGroupGroupIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => ApiDatabaseViewsViewIdGroupBysPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => ApiIntegrationIntegrationIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => ApiDatabaseViewsViewIdGroupBysPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => ApiIntegrationIntegrationIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => ApiDatabaseViewsViewIdRotateSlugPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => ApiIntegrationIntegrationIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => ApiDatabaseViewsViewIdRotateSlugPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => ApiIntegrationIntegrationIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => ApiDatabaseViewsViewIdSortingsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => ApiIntegrationIntegrationIdMovePatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => ApiDatabaseViewsViewIdSortingsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => ApiIntegrationIntegrationIdMovePatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => ApiDatabaseViewsViewIdSortingsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => ApiJobsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => ApiDatabaseViewsViewIdSortingsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => ApiJobsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => ApiJobsJobIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => ApiLicensesPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => ApiLicensesIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => ApiDatabaseViewsCalendarViewIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => ApiLicensesIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => ApiDatabaseViewsCalendarViewIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => ApiLicensesIdUserIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => ApiLicensesIdUserIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => ApiLicensesIdUserIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => ApiLicensesIdUserIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => ApiLicensesIdCheckGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => ApiLicensesIdFillSeatsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => ApiLicensesIdFillSeatsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => ApiLicensesIdLookupUsersGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => ApiLicensesIdRemoveAllUsersPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => ApiLicensesIdRemoveAllUsersPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => ApiNotificationsWorkspaceIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => ApiNotificationsWorkspaceIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => ApiNotificationsWorkspaceIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => ApiDatabaseViewsFilterViewFilterIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => ApiNotificationsWorkspaceIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => ApiDatabaseViewsFilterViewFilterIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => ApiDatabaseViewsFilterViewFilterIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => ApiDatabaseViewsFilterViewFilterIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => ApiDatabaseViewsFilterViewFilterIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => ApiDatabaseViewsFilterViewFilterIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => ApiRoleGroupIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => ApiDatabaseViewsFormSlugSubmitGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => ApiRoleGroupIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => ApiDatabaseViewsFormSlugSubmitGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => ApiRoleGroupIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => ApiDatabaseViewsFormSlugSubmitPostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => ApiRoleGroupIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => ApiDatabaseViewsFormSlugSubmitPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => ApiRoleGroupIdBatchPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => ApiDatabaseViewsFormSlugUploadFilePostResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => ApiRoleGroupIdBatchPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => ApiDatabaseViewsFormSlugUploadFilePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => ApiRoleWorkspaceIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => ApiDatabaseViewsFormSlugUploadFilePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => ApiRoleWorkspaceIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => ApiRoleWorkspaceIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => ApiRoleWorkspaceIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => ApiDatabaseViewsGallerySlugPublicRowsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => ApiRoleWorkspaceIdBatchPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => ApiDatabaseViewsGalleryViewIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => ApiRoleWorkspaceIdBatchPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => ApiDatabaseViewsGalleryViewIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => ApiRowCommentsTableIdRowIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => ApiRowCommentsTableIdRowIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => ApiRowCommentsTableIdRowIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => ApiRowCommentsTableIdRowIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => ApiDatabaseViewsGridSlugPublicRowsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => ApiDatabaseViewsGridViewIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => ApiDatabaseViewsGridViewIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => ApiDatabaseViewsGridViewIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => ApiDatabaseViewsGridViewIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => ApiSnapshotsSnapshotIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => ApiSnapshotsSnapshotIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse200Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => ApiDatabaseViewsGridViewIdAggregationsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => ApiSsoSamlLoginUrlGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => ApiTeamsTeamIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => ApiTeamsTeamIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => ApiTeamsTeamIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => ApiTeamsTeamIdPutResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => ApiTeamsTeamIdPutResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => ApiTeamsTeamIdSubjectsGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => ApiDatabaseViewsKanbanViewIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => ApiTeamsTeamIdSubjectsPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => ApiDatabaseViewsKanbanViewIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => ApiTeamsTeamIdSubjectsPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => ApiDatabaseViewsSortViewSortIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => ApiDatabaseViewsSortViewSortIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => ApiDatabaseViewsSortViewSortIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => ApiDatabaseViewsSortViewSortIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => ApiTeamsGroupGroupIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => ApiDatabaseViewsSortViewSortIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => ApiTeamsGroupGroupIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => ApiDatabaseViewsSortViewSortIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => ApiTeamsGroupGroupIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => ApiDatabaseViewsTableTableIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => ApiDatabaseViewsTableTableIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => ApiDatabaseViewsTableTableIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => ApiDatabaseViewsTableTableIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => ApiDatabaseViewsTableTableIdOrderPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => ApiDatabaseViewsTableTableIdOrderPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => ApiDatabaseWebhooksWebhookIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => ApiDatabaseWebhooksWebhookIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => ApiDatabaseWebhooksWebhookIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => ApiDatabaseWebhooksWebhookIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => ApiDatabaseWebhooksWebhookIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => ApiDatabaseWebhooksWebhookIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => ApiTrashGroupGroupIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => ApiDatabaseWebhooksTableTableIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => ApiTrashGroupGroupIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => ApiDatabaseWebhooksTableTableIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => ApiTrashRestorePatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => ApiDatabaseWebhooksTableTableIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => ApiDatabaseWebhooksTableTableIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => ApiDatabaseWebhooksTableTableIdTestCallPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => ApiUserPostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => ApiDatabaseWebhooksTableTableIdTestCallPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => ApiUserPostResponse200UserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => ApiFilesSignedDataGetResponse403Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => ApiUserPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => ApiGroupsGroupIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => ApiUserPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => ApiGroupsGroupIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => ApiUserFilesUploadFilePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => ApiGroupsGroupIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => ApiUserFilesUploadViaUrlPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => ApiGroupsGroupIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => ApiUserSourceAuthRefreshPostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => ApiGroupsGroupIdLeavePostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => ApiUserSourceUserSourceIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => ApiGroupsGroupIdLeavePostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => ApiUserSourceUserSourceIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => ApiGroupsGroupIdPermissionsGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => ApiUserSourceUserSourceIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => ApiGroupsInvitationsGroupInvitationIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => ApiUserSourceUserSourceIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => ApiGroupsInvitationsGroupInvitationIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => ApiGroupsInvitationsGroupInvitationIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => ApiUserSourceUserSourceIdMovePatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => ApiGroupsInvitationsGroupInvitationIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => ApiUserSourceUserSourceIdMovePatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => ApiGroupsInvitationsGroupInvitationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => ApiGroupsInvitationsGroupInvitationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => ApiUserAccountPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => ApiUserChangePasswordPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => ApiUserResetPasswordPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => ApiUserScheduleAccountDeletionPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => ApiUserSendResetPasswordEmailPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => ApiGroupsInvitationsGroupGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => ApiUserTokenAuthPostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => ApiGroupsInvitationsGroupGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => ApiUserTokenAuthPostResponse200UserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => ApiGroupsInvitationsGroupGroupIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => ApiUserTokenAuthPostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => ApiGroupsInvitationsGroupGroupIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => ApiUserTokenRefreshPostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => ApiGroupsInvitationsTokenTokenGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => ApiUserTokenRefreshPostResponse200UserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => ApiGroupsInvitationsTokenTokenGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => ApiUserTokenRefreshPostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => ApiGroupsUsersGroupUserIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => ApiUserTokenVerifyPostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => ApiGroupsUsersGroupUserIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => ApiUserTokenVerifyPostResponse200UserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => ApiGroupsUsersGroupUserIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => ApiUserTokenVerifyPostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => ApiGroupsUsersGroupUserIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => ApiUserVerifyEmailPostResponse200Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => ApiGroupsUsersGroupGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => ApiUserVerifyEmailPostResponse200UserNormalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => ApiGroupsUsersGroupGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => ApiUserVerifyEmailPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => ApiIntegrationIntegrationIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => ApiUserVerifyEmailPostResponse401Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => ApiIntegrationIntegrationIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => ApiIntegrationIntegrationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => ApiIntegrationIntegrationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => ApiWorkspacesWorkspaceIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => ApiIntegrationIntegrationIdMovePatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => ApiWorkspacesWorkspaceIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => ApiIntegrationIntegrationIdMovePatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => ApiJobsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => ApiJobsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => ApiJobsJobIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => ApiLicensesPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => ApiLicensesIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => ApiLicensesIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => ApiLicensesIdUserIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => ApiLicensesIdUserIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => ApiLicensesIdUserIdPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => ApiLicensesIdUserIdPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => ApiLicensesIdCheckGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => ApiLicensesIdFillSeatsPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => ApiLicensesIdFillSeatsPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => ApiLicensesIdLookupUsersGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => ApiLicensesIdRemoveAllUsersPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => ApiLicensesIdRemoveAllUsersPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => ApiNotificationsWorkspaceIdDeleteResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => ApiNotificationsWorkspaceIdDeleteResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => ApiNotificationsWorkspaceIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => ApiNotificationsWorkspaceIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => ApiNotificationsWorkspaceIdNotificationIdPatchResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => ApiNotificationsWorkspaceIdNotificationIdPatchResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => ApiRoleGroupIdGetResponse400Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => ApiRoleGroupIdGetResponse404Normalizer::class, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer::class, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => ApiRoleGroupIdPostResponse400Normalizer::class, + \Jane\Component\JsonSchemaRuntime\Reference::class => \CedricZiel\Baserow\Generated\Runtime\Normalizer\ReferenceNormalizer::class, + ]; + protected $normalizersCache = []; - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => ApiRoleGroupIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => ApiRoleGroupIdBatchPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => ApiRoleGroupIdBatchPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => ApiRoleWorkspaceIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => ApiRoleWorkspaceIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => ApiRoleWorkspaceIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => ApiRoleWorkspaceIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => ApiRoleWorkspaceIdBatchPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => ApiRoleWorkspaceIdBatchPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => ApiRowCommentsTableIdRowIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => ApiRowCommentsTableIdRowIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => ApiRowCommentsTableIdRowIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => ApiRowCommentsTableIdRowIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => ApiRowCommentsTableIdRowIdNotificationModePutResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => ApiRowCommentsTableIdRowIdNotificationModePutResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => ApiRowCommentsTableIdCommentCommentIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => ApiRowCommentsTableIdCommentCommentIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => ApiSnapshotsSnapshotIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => ApiSnapshotsSnapshotIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => ApiSnapshotsSnapshotIdRestorePostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => ApiSnapshotsSnapshotIdRestorePostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => ApiSnapshotsApplicationApplicationIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => ApiSnapshotsApplicationApplicationIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => ApiSnapshotsApplicationApplicationIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => ApiSnapshotsApplicationApplicationIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => ApiSsoSamlLoginUrlGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => ApiTeamsTeamIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => ApiTeamsTeamIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => ApiTeamsTeamIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => ApiTeamsTeamIdPutResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => ApiTeamsTeamIdPutResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => ApiTeamsTeamIdSubjectsGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => ApiTeamsTeamIdSubjectsPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => ApiTeamsTeamIdSubjectsPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => ApiTeamsTeamIdSubjectsSubjectIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => ApiTeamsGroupGroupIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => ApiTeamsGroupGroupIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => ApiTeamsGroupGroupIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => ApiTeamsWorkspaceWorkspaceIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => ApiTeamsWorkspaceWorkspaceIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => ApiTeamsWorkspaceWorkspaceIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => ApiTemplatesInstallGroupIdTemplateIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => ApiTemplatesInstallGroupIdTemplateIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => ApiTrashGroupGroupIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => ApiTrashGroupGroupIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => ApiTrashRestorePatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => ApiTrashWorkspaceWorkspaceIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => ApiTrashWorkspaceWorkspaceIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => ApiUserPostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => ApiUserPostResponse200UserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => ApiUserPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => ApiUserPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => ApiUserFilesUploadFilePostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => ApiUserFilesUploadViaUrlPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => ApiUserSourceAuthRefreshPostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => ApiUserSourceUserSourceIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => ApiUserSourceUserSourceIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => ApiUserSourceUserSourceIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => ApiUserSourceUserSourceIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => ApiUserSourceUserSourceIdForceTokenAuthPostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => ApiUserSourceUserSourceIdMovePatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => ApiUserSourceUserSourceIdMovePatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => ApiUserSourceUserSourceIdTokenAuthPostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => ApiUserAccountPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => ApiUserChangePasswordPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => ApiUserResetPasswordPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => ApiUserScheduleAccountDeletionPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => ApiUserSendResetPasswordEmailPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => ApiUserTokenAuthPostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => ApiUserTokenAuthPostResponse200UserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => ApiUserTokenAuthPostResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => ApiUserTokenRefreshPostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => ApiUserTokenRefreshPostResponse200UserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => ApiUserTokenRefreshPostResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => ApiUserTokenVerifyPostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => ApiUserTokenVerifyPostResponse200UserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => ApiUserTokenVerifyPostResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => ApiUserVerifyEmailPostResponse200Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => ApiUserVerifyEmailPostResponse200UserNormalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => ApiUserVerifyEmailPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => ApiUserVerifyEmailPostResponse401Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => ApiWorkspacesWorkspaceIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => ApiWorkspacesWorkspaceIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => ApiWorkspacesWorkspaceIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => ApiWorkspacesWorkspaceIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => ApiWorkspacesWorkspaceIdLeavePostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => ApiWorkspacesWorkspaceIdLeavePostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => ApiWorkspacesWorkspaceIdPermissionsGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => ApiWorkspacesInvitationsTokenTokenGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => ApiWorkspacesInvitationsTokenTokenGetResponse404Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400Normalizer::class, - - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404Normalizer::class, + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool + { + return array_key_exists($type, $this->normalizers); + } - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400Normalizer::class, + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && array_key_exists(get_class($data), $this->normalizers); + } - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404Normalizer::class, + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $normalizerClass = $this->normalizers[get_class($data)]; + $normalizer = $this->getNormalizer($normalizerClass); - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400Normalizer::class, + return $normalizer->normalize($data, $format, $context); + } - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404Normalizer::class, + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + $denormalizerClass = $this->normalizers[$type]; + $denormalizer = $this->getNormalizer($denormalizerClass); - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => ApiWorkspacesUsersWorkspaceUserIdPatchResponse400Normalizer::class, + return $denormalizer->denormalize($data, $type, $format, $context); + } - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => ApiWorkspacesUsersWorkspaceUserIdPatchResponse404Normalizer::class, + private function getNormalizer(string $normalizerClass) + { + return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); + } - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400Normalizer::class, + private function initNormalizer(string $normalizerClass) + { + $normalizer = new $normalizerClass(); + $normalizer->setNormalizer($this->normalizer); + $normalizer->setDenormalizer($this->denormalizer); + $this->normalizersCache[$normalizerClass] = $normalizer; - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404Normalizer::class, + return $normalizer; + } - \Jane\Component\JsonSchemaRuntime\Reference::class => \CedricZiel\Baserow\Generated\Runtime\Normalizer\ReferenceNormalizer::class, + public function getSupportedTypes(?string $format = null): array + { + return [ + \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\AIFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\Account::class => false, + \CedricZiel\Baserow\Generated\Model\ActionScopes::class => false, + \CedricZiel\Baserow\Generated\Model\AdminDashboard::class => false, + \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => false, + \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\AuditLog::class => false, + \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => false, + \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\AuditLogUser::class => false, + \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => false, + \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => false, + \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => false, + \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => false, + \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => false, + \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderApplication::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => false, + \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => false, + \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => false, + \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => false, + \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => false, + \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => false, + \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => false, + \CedricZiel\Baserow\Generated\Model\CalendarViewView::class => false, + \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => false, + \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ChoiceOption::class => false, + \CedricZiel\Baserow\Generated\Model\Collaborator::class => false, + \CedricZiel\Baserow\Generated\Model\CollectionField::class => false, + \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => false, + \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => false, + \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => false, + \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => false, + \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => false, + \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\CountFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\CreatePage::class => false, + \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => false, + \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => false, + \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => false, + \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => false, + \CedricZiel\Baserow\Generated\Model\CreateViewSort::class => false, + \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => false, + \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => false, + \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => false, + \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => false, + \CedricZiel\Baserow\Generated\Model\Dashboard::class => false, + \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => false, + \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => false, + \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => false, + \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => false, + \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => false, + \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\DateFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateElement::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => false, + \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => false, + \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\DurationFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\Element::class => false, + \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\EmailFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => false, + \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => false, + \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => false, + \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => false, + \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => false, + \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => false, + \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => false, + \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => false, + \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => false, + \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => false, + \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => false, + \CedricZiel\Baserow\Generated\Model\RowResponse::class => false, + \CedricZiel\Baserow\Generated\Model\ExportJob::class => false, + \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\Field::class => false, + \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\FileFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => false, + \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => false, + \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewView::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => false, + \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => false, + \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => false, + \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => false, + \CedricZiel\Baserow\Generated\Model\GalleryViewView::class => false, + \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => false, + \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => false, + \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => false, + \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => false, + \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => false, + \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => false, + \CedricZiel\Baserow\Generated\Model\GridViewFilter::class => false, + \CedricZiel\Baserow\Generated\Model\GridViewView::class => false, + \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => false, + \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => false, + \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => false, + \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => false, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => false, + \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => false, + \CedricZiel\Baserow\Generated\Model\InstanceId::class => false, + \CedricZiel\Baserow\Generated\Model\Job::class => false, + \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => false, + \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => false, + \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => false, + \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => false, + \CedricZiel\Baserow\Generated\Model\KanbanViewView::class => false, + \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\License::class => false, + \CedricZiel\Baserow\Generated\Model\LicenseUser::class => false, + \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => false, + \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => false, + \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\LinkElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\LinkRowValue::class => false, + \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => false, + \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => false, + \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => false, + \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => false, + \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\LookupFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => false, + \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => false, + \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => false, + \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\NumberFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\OllamaSettings::class => false, + \CedricZiel\Baserow\Generated\Model\OpenAISettings::class => false, + \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => false, + \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => false, + \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => false, + \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => false, + \CedricZiel\Baserow\Generated\Model\OrderApplications::class => false, + \CedricZiel\Baserow\Generated\Model\OrderDomains::class => false, + \CedricZiel\Baserow\Generated\Model\OrderPages::class => false, + \CedricZiel\Baserow\Generated\Model\OrderTables::class => false, + \CedricZiel\Baserow\Generated\Model\OrderViews::class => false, + \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => false, + \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => false, + \CedricZiel\Baserow\Generated\Model\Page::class => false, + \CedricZiel\Baserow\Generated\Model\PageParameterValue::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false, + \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => false, + \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedAccount::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => false, + \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedSettings::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => false, + \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => false, + \CedricZiel\Baserow\Generated\Model\PathParam::class => false, + \CedricZiel\Baserow\Generated\Model\PermissionObject::class => false, + \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\PublicBuilder::class => false, + \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => false, + \CedricZiel\Baserow\Generated\Model\PublicField::class => false, + \CedricZiel\Baserow\Generated\Model\PublicFormView::class => false, + \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => false, + \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => false, + \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => false, + \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => false, + \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => false, + \CedricZiel\Baserow\Generated\Model\PublicNone::class => false, + \CedricZiel\Baserow\Generated\Model\PublicPage::class => false, + \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false, + \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false, + \CedricZiel\Baserow\Generated\Model\PublicView::class => false, + \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => false, + \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => false, + \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => false, + \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => false, + \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => false, + \CedricZiel\Baserow\Generated\Model\PublicViewSort::class => false, + \CedricZiel\Baserow\Generated\Model\PublicViewTable::class => false, + \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\RatingFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => false, + \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => false, + \CedricZiel\Baserow\Generated\Model\Register::class => false, + \CedricZiel\Baserow\Generated\Model\RegisterLicense::class => false, + \CedricZiel\Baserow\Generated\Model\RelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\Report::class => false, + \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => false, + \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => false, + \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => false, + \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\RollupFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\RowComment::class => false, + \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => false, + \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => false, + \CedricZiel\Baserow\Generated\Model\RowHistory::class => false, + \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => false, + \CedricZiel\Baserow\Generated\Model\RowMetadata::class => false, + \CedricZiel\Baserow\Generated\Model\SAMLResponse::class => false, + \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => false, + \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => false, + \CedricZiel\Baserow\Generated\Model\SelectOption::class => false, + \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => false, + \CedricZiel\Baserow\Generated\Model\Sender::class => false, + \CedricZiel\Baserow\Generated\Model\Settings::class => false, + \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => false, + \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => false, + \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => false, + \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => false, + \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => false, + \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => false, + \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => false, + \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => false, + \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => false, + \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => false, + \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\Snapshot::class => false, + \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => false, + \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => false, + \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => false, + \CedricZiel\Baserow\Generated\Model\SubjectUser::class => false, + \CedricZiel\Baserow\Generated\Model\Table::class => false, + \CedricZiel\Baserow\Generated\Model\TableCreate::class => false, + \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\TableElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\TableImport::class => false, + \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => false, + \CedricZiel\Baserow\Generated\Model\TableWebhook::class => false, + \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => false, + \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => false, + \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => false, + \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => false, + \CedricZiel\Baserow\Generated\Model\Team::class => false, + \CedricZiel\Baserow\Generated\Model\TeamResponse::class => false, + \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => false, + \CedricZiel\Baserow\Generated\Model\TeamSubject::class => false, + \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => false, + \CedricZiel\Baserow\Generated\Model\Template::class => false, + \CedricZiel\Baserow\Generated\Model\TemplateCategories::class => false, + \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => false, + \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\TextElementElement::class => false, + \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => false, + \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => false, + \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => false, + \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\TextFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\Token::class => false, + \CedricZiel\Baserow\Generated\Model\TokenPermissions::class => false, + \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => false, + \CedricZiel\Baserow\Generated\Model\TokenCreate::class => false, + \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => false, + \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => false, + \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => false, + \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => false, + \CedricZiel\Baserow\Generated\Model\TrashContents::class => false, + \CedricZiel\Baserow\Generated\Model\TrashStructure::class => false, + \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => false, + \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => false, + \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => false, + \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => false, + \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => false, + \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => false, + \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => false, + \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\URLFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => false, + \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => false, + \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => false, + \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => false, + \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => false, + \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => false, + \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => false, + \CedricZiel\Baserow\Generated\Model\User::class => false, + \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => false, + \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => false, + \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => false, + \CedricZiel\Baserow\Generated\Model\UserFile::class => false, + \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => false, + \CedricZiel\Baserow\Generated\Model\UserSourceUser::class => false, + \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => false, + \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => false, + \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => false, + \CedricZiel\Baserow\Generated\Model\View::class => false, + \CedricZiel\Baserow\Generated\Model\ViewDecoration::class => false, + \CedricZiel\Baserow\Generated\Model\ViewFilter::class => false, + \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => false, + \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => false, + \CedricZiel\Baserow\Generated\Model\ViewSort::class => false, + \CedricZiel\Baserow\Generated\Model\Workspace::class => false, + \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => false, + \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => false, + \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => false, + \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => false, + \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => false, + \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => false, + \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => false, + \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => false, + \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => false, + \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => false, + \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => false, + \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => false, + \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => false, + \Jane\Component\JsonSchemaRuntime\Reference::class => false, ]; - protected $normalizersCache = []; - - public function supportsDenormalization($data, $type, $format = null, array $context = []): bool - { - return array_key_exists($type, $this->normalizers); - } - - public function supportsNormalization($data, $format = null, array $context = []): bool - { - return is_object($data) && array_key_exists(get_class($data), $this->normalizers); - } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $normalizerClass = $this->normalizers[get_class($object)]; - $normalizer = $this->getNormalizer($normalizerClass); - - return $normalizer->normalize($object, $format, $context); - } - - public function denormalize($data, $type, $format = null, array $context = []) - { - $denormalizerClass = $this->normalizers[$type]; - $denormalizer = $this->getNormalizer($denormalizerClass); - - return $denormalizer->denormalize($data, $type, $format, $context); - } - - private function getNormalizer(string $normalizerClass) - { - return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); - } - - private function initNormalizer(string $normalizerClass) - { - $normalizer = new $normalizerClass(); - $normalizer->setNormalizer($this->normalizer); - $normalizer->setDenormalizer($this->denormalizer); - $this->normalizersCache[$normalizerClass] = $normalizer; - - return $normalizer; - } - - public function getSupportedTypes(?string $format = null): array - { - return [ - \CedricZiel\Baserow\Generated\Model\AIFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\AIFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\AIFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\AIFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\Account::class => false, - \CedricZiel\Baserow\Generated\Model\ActionScopes::class => false, - \CedricZiel\Baserow\Generated\Model\AdminDashboard::class => false, - \CedricZiel\Baserow\Generated\Model\AdminDashboardPerDay::class => false, - \CedricZiel\Baserow\Generated\Model\AirtableImportJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\AirtableImportJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLog::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogActionType::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogExportJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogExportJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogUser::class => false, - \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\AuthFormElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\AutonumberFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\AutonumberFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\AutonumberFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\AutonumberFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\BaseExporterOptions::class => false, - \CedricZiel\Baserow\Generated\Model\BaserowImpersonateAuthToken::class => false, - \CedricZiel\Baserow\Generated\Model\BatchCreateRoleAssignment::class => false, - \CedricZiel\Baserow\Generated\Model\BatchDeleteRows::class => false, - \CedricZiel\Baserow\Generated\Model\BooleanFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\BooleanFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\BooleanFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\BooleanFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplication::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplicationGroup::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplicationWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplicationTheme::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderApplicationFaviconFile::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphic::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationCreatePolymorphicFaviconFile::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphic::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderBaseApplicationUpdatePolymorphicFaviconFile::class => false, - \CedricZiel\Baserow\Generated\Model\BuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonConfigBlockButton::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockButton::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlockLink::class => false, - \CedricZiel\Baserow\Generated\Model\ButtonThemeConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponse::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewExampleResponseStack::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewView::class => false, - \CedricZiel\Baserow\Generated\Model\ChangePasswordBodyValidation::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\CheckboxElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ChoiceOption::class => false, - \CedricZiel\Baserow\Generated\Model\Collaborator::class => false, - \CedricZiel\Baserow\Generated\Model\CollectionField::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ColumnElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocks::class => false, - \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColor::class => false, - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilter::class => false, - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColorFilterGroup::class => false, - \CedricZiel\Baserow\Generated\Model\ConditionalColorValueProviderConfColors::class => false, - \CedricZiel\Baserow\Generated\Model\CountFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\CountFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\CountFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\CountFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatePage::class => false, - \CedricZiel\Baserow\Generated\Model\CreateRoleAssignment::class => false, - \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\CreateSnapshotJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\CreateViewFilter::class => false, - \CedricZiel\Baserow\Generated\Model\CreateViewFilterGroup::class => false, - \CedricZiel\Baserow\Generated\Model\CreateViewGroupBy::class => false, - \CedricZiel\Baserow\Generated\Model\CreateViewSort::class => false, - \CedricZiel\Baserow\Generated\Model\CreateWorkspaceInvitation::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedByFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedByFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedByFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedByFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\CreatedOnFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\CsvExporterOptions::class => false, - \CedricZiel\Baserow\Generated\Model\CustomDomainCreateDomain::class => false, - \CedricZiel\Baserow\Generated\Model\CustomDomainDomain::class => false, - \CedricZiel\Baserow\Generated\Model\Dashboard::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseApplicationGroup::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseApplicationWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationCreatePolymorphic::class => false, - \CedricZiel\Baserow\Generated\Model\DatabaseBaseApplicationUpdatePolymorphic::class => false, - \CedricZiel\Baserow\Generated\Model\DateFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\DateFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\DateFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\DateFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateApplicationJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateElement::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobOriginalField::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateFieldJobJobDuplicatedField::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobOriginalPage::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicatePageJobJobDuplicatedPage::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobOriginalTable::class => false, - \CedricZiel\Baserow\Generated\Model\DuplicateTableJobJobDuplicatedTable::class => false, - \CedricZiel\Baserow\Generated\Model\DurationFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\DurationFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\DurationFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\DurationFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\Element::class => false, - \CedricZiel\Baserow\Generated\Model\ElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\EmailFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\EmailFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\EmailFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\EmailFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\EmailTesterRequest::class => false, - \CedricZiel\Baserow\Generated\Model\EmailTesterResponse::class => false, - \CedricZiel\Baserow\Generated\Model\BatchCreateRowRequest::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleBatchRowsResponse::class => false, - \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowRequest::class => false, - \CedricZiel\Baserow\Generated\Model\CreateRowRequest::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField10::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField12::class => false, - \CedricZiel\Baserow\Generated\Model\ExampleRowResponseField16::class => false, - \CedricZiel\Baserow\Generated\Model\RowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\ExportJob::class => false, - \CedricZiel\Baserow\Generated\Model\FacebookAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\Field::class => false, - \CedricZiel\Baserow\Generated\Model\FieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldResponse::class => false, - \CedricZiel\Baserow\Generated\Model\FileFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\FileImportJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\FileImportJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\FileImportJobJobReport::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\FormContainerElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewCreateViewCoverImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewCreateViewLogoImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewSubmitted::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewView::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewViewCoverImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewViewLogoImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormulaFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\FormulaFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\FormulaFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\FormulaFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\FullHealthCheck::class => false, - \CedricZiel\Baserow\Generated\Model\GalleryViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\GalleryViewView::class => false, - \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIRequest::class => false, - \CedricZiel\Baserow\Generated\Model\GenerateFormulaWithAIResponse::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorCreateViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorUpdateViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedConditionalColorViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorCreateViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorUpdateViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\GeneratedSingleSelectColorViewDecorationValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\GenerativeAISettings::class => false, - \CedricZiel\Baserow\Generated\Model\GitHubAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\GitLabAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\GoogleAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewFilter::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewView::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\HeadingElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\IFrameElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\ImageConfigBlockImage::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementCreateElementImageFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageElementUpdateElementImageFile::class => false, - \CedricZiel\Baserow\Generated\Model\ImageThemeConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\InputTextElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobTemplate::class => false, - \CedricZiel\Baserow\Generated\Model\InstallTemplateJobJobGroup::class => false, - \CedricZiel\Baserow\Generated\Model\InstanceId::class => false, - \CedricZiel\Baserow\Generated\Model\Job::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewView::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\License::class => false, - \CedricZiel\Baserow\Generated\Model\LicenseUser::class => false, - \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => false, - \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\LinkRowValue::class => false, - \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => false, - \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => false, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\LookupFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\NumberFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\OllamaSettings::class => false, - \CedricZiel\Baserow\Generated\Model\OpenAISettings::class => false, - \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => false, - \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => false, - \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => false, - \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\OrderApplications::class => false, - \CedricZiel\Baserow\Generated\Model\OrderDomains::class => false, - \CedricZiel\Baserow\Generated\Model\OrderPages::class => false, - \CedricZiel\Baserow\Generated\Model\OrderTables::class => false, - \CedricZiel\Baserow\Generated\Model\OrderViews::class => false, - \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => false, - \CedricZiel\Baserow\Generated\Model\Page::class => false, - \CedricZiel\Baserow\Generated\Model\PageParameterValue::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedAccount::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedSettings::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\PathParam::class => false, - \CedricZiel\Baserow\Generated\Model\PermissionObject::class => false, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\PublicBuilder::class => false, - \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => false, - \CedricZiel\Baserow\Generated\Model\PublicField::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormView::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => false, - \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => false, - \CedricZiel\Baserow\Generated\Model\PublicNone::class => false, - \CedricZiel\Baserow\Generated\Model\PublicPage::class => false, - \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PublicView::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewSort::class => false, - \CedricZiel\Baserow\Generated\Model\PublicViewTable::class => false, - \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\RatingFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => false, - \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => false, - \CedricZiel\Baserow\Generated\Model\Register::class => false, - \CedricZiel\Baserow\Generated\Model\RegisterLicense::class => false, - \CedricZiel\Baserow\Generated\Model\RelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\Report::class => false, - \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => false, - \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => false, - \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => false, - \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\RollupFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\RowComment::class => false, - \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => false, - \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => false, - \CedricZiel\Baserow\Generated\Model\RowHistory::class => false, - \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => false, - \CedricZiel\Baserow\Generated\Model\RowMetadata::class => false, - \CedricZiel\Baserow\Generated\Model\SAMLResponse::class => false, - \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => false, - \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => false, - \CedricZiel\Baserow\Generated\Model\SelectOption::class => false, - \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => false, - \CedricZiel\Baserow\Generated\Model\Sender::class => false, - \CedricZiel\Baserow\Generated\Model\Settings::class => false, - \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => false, - \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => false, - \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => false, - \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => false, - \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => false, - \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => false, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => false, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => false, - \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => false, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\Snapshot::class => false, - \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => false, - \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => false, - \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => false, - \CedricZiel\Baserow\Generated\Model\SubjectUser::class => false, - \CedricZiel\Baserow\Generated\Model\Table::class => false, - \CedricZiel\Baserow\Generated\Model\TableCreate::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TableImport::class => false, - \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhook::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => false, - \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => false, - \CedricZiel\Baserow\Generated\Model\Team::class => false, - \CedricZiel\Baserow\Generated\Model\TeamResponse::class => false, - \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => false, - \CedricZiel\Baserow\Generated\Model\TeamSubject::class => false, - \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => false, - \CedricZiel\Baserow\Generated\Model\Template::class => false, - \CedricZiel\Baserow\Generated\Model\TemplateCategories::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementElement::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => false, - \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => false, - \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\TextFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\Token::class => false, - \CedricZiel\Baserow\Generated\Model\TokenPermissions::class => false, - \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => false, - \CedricZiel\Baserow\Generated\Model\TokenCreate::class => false, - \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => false, - \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => false, - \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => false, - \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => false, - \CedricZiel\Baserow\Generated\Model\TrashContents::class => false, - \CedricZiel\Baserow\Generated\Model\TrashStructure::class => false, - \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => false, - \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => false, - \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => false, - \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => false, - \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => false, - \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => false, - \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\URLFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => false, - \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => false, - \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => false, - \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => false, - \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => false, - \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => false, - \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => false, - \CedricZiel\Baserow\Generated\Model\User::class => false, - \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => false, - \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => false, - \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => false, - \CedricZiel\Baserow\Generated\Model\UserFile::class => false, - \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => false, - \CedricZiel\Baserow\Generated\Model\UserSourceUser::class => false, - \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => false, - \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => false, - \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => false, - \CedricZiel\Baserow\Generated\Model\View::class => false, - \CedricZiel\Baserow\Generated\Model\ViewDecoration::class => false, - \CedricZiel\Baserow\Generated\Model\ViewFilter::class => false, - \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => false, - \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => false, - \CedricZiel\Baserow\Generated\Model\ViewSort::class => false, - \CedricZiel\Baserow\Generated\Model\Workspace::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => false, - \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => false, - \CedricZiel\Baserow\Generated\Model\CalendarViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewUpdateCoverImage::class => false, - \CedricZiel\Baserow\Generated\Model\FormViewUpdateLogoImage::class => false, - \CedricZiel\Baserow\Generated\Model\GalleryViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\GridViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => false, - \CedricZiel\Baserow\Generated\Model\ApiHealthEmailPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogActionTypesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogExportPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogUsersGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuditLogWorkspacesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminAuthProviderAuthProviderIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminGroupsGroupIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersUserIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminUsersImpersonatePostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAdminWorkspacesWorkspaceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdIntegrationsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdListUserSourceUsersGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationApplicationIdUserSourcesRolesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsApplicationIdDuplicateAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsGroupGroupIdOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiApplicationsWorkspaceWorkspaceIdOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogActionTypesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogExportPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogUsersGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiAuditLogWorkspacesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdDomainsOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdPagesOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderBuilderIdThemePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdDispatchPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDataSourceDataSourceIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsDomainIdPublishAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByIdBuilderIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedByNameDomainNameGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdDataSourcesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdElementsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderDomainsPublishedPagePageIdWorkflowActionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdDuplicatePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderElementElementIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDataSourcesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdDispatchDataSourcesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdElementsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagePageIdWorkflowActionsOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderPagesPageIdDuplicateAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiBuilderWorkflowActionWorkflowActionIdDispatchPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportJobIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseExportTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdDuplicateAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdGenerateAiFieldValuesPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsFieldIdUniqueRowValuesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFieldsTableTableIdGenerateAiFormulaPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseFormulaTableIdTypePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse200TableId::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsNamesGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdAdjacentGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdHistoryGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdRowIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseRowsTableTableIdBatchDeletePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdDuplicateAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesTableIdImportAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTablesDatabaseDatabaseIdOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensTokenIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseTokensCheckGetResponse403::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewViewIdPremiumPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugLinkRowFieldLookupFieldIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicAuthPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSlugPublicInfoGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDecorationsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdDuplicatePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFieldOptionsPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFilterGroupsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdFiltersPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdGroupBysPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdRotateSlugPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsViewIdSortingsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarSlugPublicRowsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsCalendarViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsDecorationViewDecorationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterGroupFilterGroupIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFilterViewFilterIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugSubmitPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsFormSlugUploadFilePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGallerySlugPublicRowsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGalleryViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicAggregationsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridSlugPublicRowsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationFieldIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGridViewIdAggregationsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsGroupByViewGroupByIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanSlugPublicRowsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsKanbanViewIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsSortViewSortIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseViewsTableTableIdOrderPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksWebhookIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiDatabaseWebhooksTableTableIdTestCallPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiFilesSignedDataGetResponse403::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdLeavePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsGroupIdPermissionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdAcceptPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupInvitationIdRejectPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsGroupGroupIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsInvitationsTokenTokenGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupUserIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiGroupsUsersGroupGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiIntegrationIntegrationIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiJobsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiJobsJobIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdUserIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdCheckGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdFillSeatsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdLookupUsersGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiLicensesIdRemoveAllUsersPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdNotificationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiNotificationsWorkspaceIdMarkAllAsReadPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleGroupIdBatchPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRoleWorkspaceIdBatchPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdRowIdNotificationModePutResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiRowCommentsTableIdCommentCommentIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsSnapshotIdRestorePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSnapshotsApplicationApplicationIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiSsoSamlLoginUrlGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdPutResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsTeamIdSubjectsSubjectIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsGroupGroupIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTeamsWorkspaceWorkspaceIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallGroupIdTemplateIdAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTemplatesInstallWorkspaceIdTemplateIdAsyncPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashGroupGroupIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashRestorePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiTrashWorkspaceWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadFilePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserFilesUploadViaUrlPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceAuthRefreshPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdForceTokenAuthPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdMovePatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSourceUserSourceIdTokenAuthPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserAccountPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserChangePasswordPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserResetPasswordPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserScheduleAccountDeletionPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserSendResetPasswordEmailPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenAuthPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenRefreshPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserTokenVerifyPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse200User::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiUserVerifyEmailPostResponse401::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdLeavePostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdPermissionsGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesWorkspaceIdSettingsGenerativeAiPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdAcceptPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceInvitationIdRejectPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsTokenTokenGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdGetResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesInvitationsWorkspaceWorkspaceIdPostResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdDeleteResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceUserIdPatchResponse404::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse400::class => false, - \CedricZiel\Baserow\Generated\Model\ApiWorkspacesUsersWorkspaceWorkspaceIdGetResponse404::class => false, - \Jane\Component\JsonSchemaRuntime\Reference::class => false, - ]; - } } } diff --git a/generated/Normalizer/JobNormalizer.php b/generated/Normalizer/JobNormalizer.php index 81ea855..827d6fa 100644 --- a/generated/Normalizer/JobNormalizer.php +++ b/generated/Normalizer/JobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,169 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class JobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class JobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Job::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Job::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Job::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Job::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Job(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Job(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Job::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class JobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Job::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Job::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Job(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Job::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Job::class => false]; } } diff --git a/generated/Normalizer/KanbanViewCreateViewNormalizer.php b/generated/Normalizer/KanbanViewCreateViewNormalizer.php index 5681933..cc27628 100644 --- a/generated/Normalizer/KanbanViewCreateViewNormalizer.php +++ b/generated/Normalizer/KanbanViewCreateViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,239 +20,124 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class KanbanViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class KanbanViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { - $object->setSingleSelectField($data['single_select_field']); - unset($data['single_select_field']); - } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { - $object->setSingleSelectField(null); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('singleSelectField') && null !== $object->getSingleSelectField()) { - $data['single_select_field'] = $object->getSingleSelectField(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { + $object->setSingleSelectField($data['single_select_field']); + unset($data['single_select_field']); + } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { + $object->setSingleSelectField(null); + } + if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { + $object->setCardCoverImageField($data['card_cover_image_field']); + unset($data['card_cover_image_field']); + } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { + $object->setCardCoverImageField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => false]; - } + return $object; } -} else { - class KanbanViewCreateViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewCreateView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { - $object->setSingleSelectField($data['single_select_field']); - unset($data['single_select_field']); - } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { - $object->setSingleSelectField(null); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('singleSelectField') && null !== $object->getSingleSelectField()) { - $data['single_select_field'] = $object->getSingleSelectField(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('singleSelectField') && null !== $data->getSingleSelectField()) { + $dataArray['single_select_field'] = $data->getSingleSelectField(); + } + if ($data->isInitialized('cardCoverImageField') && null !== $data->getCardCoverImageField()) { + $dataArray['card_cover_image_field'] = $data->getCardCoverImageField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\KanbanViewCreateView::class => false]; } } diff --git a/generated/Normalizer/KanbanViewExampleResponseNormalizer.php b/generated/Normalizer/KanbanViewExampleResponseNormalizer.php index 9f00a73..129da15 100644 --- a/generated/Normalizer/KanbanViewExampleResponseNormalizer.php +++ b/generated/Normalizer/KanbanViewExampleResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,201 +20,99 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class KanbanViewExampleResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class KanbanViewExampleResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['rows'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class, 'json', $context); - } - $object->setRows($values); - unset($data['rows']); - } - if (\array_key_exists('field_options', $data)) { - $values_1 = []; - foreach ($data['field_options'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values_1); - unset($data['field_options']); - } - if (\array_key_exists('row_metadata', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['row_metadata'] as $key_1 => $value_2) { - $values_2[$key_1] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); - } - $object->setRowMetadata($values_2); - unset($data['row_metadata']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getRows() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + if (\array_key_exists('rows', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['rows'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class, 'json', $context); } - $data['rows'] = $values; + $object->setRows($values); + unset($data['rows']); + } + if (\array_key_exists('field_options', $data)) { $values_1 = []; - foreach ($object->getFieldOptions() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['field_options'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class, 'json', $context); } - $data['field_options'] = $values_1; - if ($object->isInitialized('rowMetadata') && null !== $object->getRowMetadata()) { - $values_2 = []; - foreach ($object->getRowMetadata() as $key_1 => $value_2) { - $values_2[$key_1] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['row_metadata'] = $values_2; + $object->setFieldOptions($values_1); + unset($data['field_options']); + } + if (\array_key_exists('row_metadata', $data)) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['row_metadata'] as $key_1 => $value_2) { + $values_2[$key_1] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); } - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $object->setRowMetadata($values_2); + unset($data['row_metadata']); + } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => false]; - } + return $object; } -} else { - class KanbanViewExampleResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getRows() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class === get_class($data); + $dataArray['rows'] = $values; + $values_1 = []; + foreach ($data->getFieldOptions() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse(); - if (null === $data || false === \is_array($data)) { - return $object; + $dataArray['field_options'] = $values_1; + if ($data->isInitialized('rowMetadata') && null !== $data->getRowMetadata()) { + $values_2 = []; + foreach ($data->getRowMetadata() as $key_1 => $value_2) { + $values_2[$key_1] = $this->normalizer->normalize($value_2, 'json', $context); } - if (\array_key_exists('rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['rows'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class, 'json', $context); - } - $object->setRows($values); - unset($data['rows']); - } - if (\array_key_exists('field_options', $data)) { - $values_1 = []; - foreach ($data['field_options'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values_1); - unset($data['field_options']); - } - if (\array_key_exists('row_metadata', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['row_metadata'] as $key_1 => $value_2) { - $values_2[$key_1] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); - } - $object->setRowMetadata($values_2); - unset($data['row_metadata']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - - return $object; + $dataArray['row_metadata'] = $values_2; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getRows() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['rows'] = $values; - $values_1 = []; - foreach ($object->getFieldOptions() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['field_options'] = $values_1; - if ($object->isInitialized('rowMetadata') && null !== $object->getRowMetadata()) { - $values_2 = []; - foreach ($object->getRowMetadata() as $key_1 => $value_2) { - $values_2[$key_1] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['row_metadata'] = $values_2; - } - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $dataArray[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponse::class => false]; } } diff --git a/generated/Normalizer/KanbanViewExampleResponseStackNormalizer.php b/generated/Normalizer/KanbanViewExampleResponseStackNormalizer.php index 863f701..81f3f1a 100644 --- a/generated/Normalizer/KanbanViewExampleResponseStackNormalizer.php +++ b/generated/Normalizer/KanbanViewExampleResponseStackNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class KanbanViewExampleResponseStackNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class KanbanViewExampleResponseStackNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => false]; - } + return $object; } -} else { - class KanbanViewExampleResponseStackNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\KanbanViewExampleResponseStack::class => false]; } } diff --git a/generated/Normalizer/KanbanViewFieldOptionsNormalizer.php b/generated/Normalizer/KanbanViewFieldOptionsNormalizer.php index fcd65d1..17b140a 100644 --- a/generated/Normalizer/KanbanViewFieldOptionsNormalizer.php +++ b/generated/Normalizer/KanbanViewFieldOptionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class KanbanViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class KanbanViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class, 'json', $context); } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } + $object->setFieldOptions($values); + unset($data['field_options']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => false]; - } + return $object; } -} else { - class KanbanViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } + $dataArray['field_options'] = $values; + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\KanbanViewFieldOptions::class => false]; } } diff --git a/generated/Normalizer/KanbanViewUpdateNormalizer.php b/generated/Normalizer/KanbanViewUpdateNormalizer.php index 7415f5e..a25fc0f 100644 --- a/generated/Normalizer/KanbanViewUpdateNormalizer.php +++ b/generated/Normalizer/KanbanViewUpdateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,247 +20,128 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class KanbanViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class KanbanViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { - $object->setSingleSelectField($data['single_select_field']); - unset($data['single_select_field']); - } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { - $object->setSingleSelectField(null); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('singleSelectField') && null !== $object->getSingleSelectField()) { - $data['single_select_field'] = $object->getSingleSelectField(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_password', $data)) { + $object->setPublicViewPassword($data['public_view_password']); + unset($data['public_view_password']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { + $object->setSingleSelectField($data['single_select_field']); + unset($data['single_select_field']); + } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { + $object->setSingleSelectField(null); + } + if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { + $object->setCardCoverImageField($data['card_cover_image_field']); + unset($data['card_cover_image_field']); + } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { + $object->setCardCoverImageField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => false]; - } + return $object; } -} else { - class KanbanViewUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class === get_class($data); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_password', $data)) { - $object->setPublicViewPassword($data['public_view_password']); - unset($data['public_view_password']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { - $object->setSingleSelectField($data['single_select_field']); - unset($data['single_select_field']); - } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { - $object->setSingleSelectField(null); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('publicViewPassword') && null !== $object->getPublicViewPassword()) { - $data['public_view_password'] = $object->getPublicViewPassword(); - } - if ($object->isInitialized('ownershipType') && null !== $object->getOwnershipType()) { - $data['ownership_type'] = $object->getOwnershipType(); - } - if ($object->isInitialized('singleSelectField') && null !== $object->getSingleSelectField()) { - $data['single_select_field'] = $object->getSingleSelectField(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('publicViewPassword') && null !== $data->getPublicViewPassword()) { + $dataArray['public_view_password'] = $data->getPublicViewPassword(); + } + if ($data->isInitialized('ownershipType') && null !== $data->getOwnershipType()) { + $dataArray['ownership_type'] = $data->getOwnershipType(); + } + if ($data->isInitialized('singleSelectField') && null !== $data->getSingleSelectField()) { + $dataArray['single_select_field'] = $data->getSingleSelectField(); + } + if ($data->isInitialized('cardCoverImageField') && null !== $data->getCardCoverImageField()) { + $dataArray['card_cover_image_field'] = $data->getCardCoverImageField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\KanbanViewUpdate::class => false]; } } diff --git a/generated/Normalizer/KanbanViewViewNormalizer.php b/generated/Normalizer/KanbanViewViewNormalizer.php index 380eb65..ef4c2a1 100644 --- a/generated/Normalizer/KanbanViewViewNormalizer.php +++ b/generated/Normalizer/KanbanViewViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,455 +20,238 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class KanbanViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class KanbanViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\KanbanViewView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); - } - if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { - $object->setSingleSelectField($data['single_select_field']); - unset($data['single_select_field']); - } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { - $object->setSingleSelectField(null); - } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewView(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public_view_has_password', $data) && \is_int($data['public_view_has_password'])) { + $data['public_view_has_password'] = (bool) $data['public_view_has_password']; + } + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); - } - if ($object->isInitialized('singleSelectField') && null !== $object->getSingleSelectField()) { - $data['single_select_field'] = $object->getSingleSelectField(); - } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); - } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewView::class => false]; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - } -} else { - class KanbanViewViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\KanbanViewView::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\KanbanViewView::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\KanbanViewView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('table', $data)) { + $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); + unset($data['table']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); } - if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { - $object->setSingleSelectField($data['single_select_field']); - unset($data['single_select_field']); - } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { - $object->setSingleSelectField(null); + $object->setFilters($values); + unset($data['filters']); + } + if (\array_key_exists('filter_groups', $data)) { + $values_1 = []; + foreach ($data['filter_groups'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); } - if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { - $object->setCardCoverImageField($data['card_cover_image_field']); - unset($data['card_cover_image_field']); - } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { - $object->setCardCoverImageField(null); + $object->setFilterGroups($values_1); + unset($data['filter_groups']); + } + if (\array_key_exists('sortings', $data)) { + $values_2 = []; + foreach ($data['sortings'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); + $object->setSortings($values_2); + unset($data['sortings']); + } + if (\array_key_exists('group_bys', $data)) { + $values_3 = []; + foreach ($data['group_bys'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); + $object->setGroupBys($values_3); + unset($data['group_bys']); + } + if (\array_key_exists('decorations', $data)) { + $values_4 = []; + foreach ($data['decorations'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } + $object->setDecorations($values_4); + unset($data['decorations']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_has_password', $data)) { + $object->setPublicViewHasPassword($data['public_view_has_password']); + unset($data['public_view_has_password']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('owned_by_id', $data)) { + $object->setOwnedById($data['owned_by_id']); + unset($data['owned_by_id']); + } + if (\array_key_exists('single_select_field', $data) && null !== $data['single_select_field']) { + $object->setSingleSelectField($data['single_select_field']); + unset($data['single_select_field']); + } elseif (\array_key_exists('single_select_field', $data) && null === $data['single_select_field']) { + $object->setSingleSelectField(null); + } + if (\array_key_exists('card_cover_image_field', $data) && null !== $data['card_cover_image_field']) { + $object->setCardCoverImageField($data['card_cover_image_field']); + unset($data['card_cover_image_field']); + } elseif (\array_key_exists('card_cover_image_field', $data) && null === $data['card_cover_image_field']) { + $object->setCardCoverImageField(null); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_5; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $dataArray['table'] = $this->normalizer->normalize($data->getTable(), 'json', $context); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); + $dataArray['filters'] = $values; + } + if ($data->isInitialized('filterGroups') && null !== $data->getFilterGroups()) { + $values_1 = []; + foreach ($data->getFilterGroups() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - if ($object->isInitialized('singleSelectField') && null !== $object->getSingleSelectField()) { - $data['single_select_field'] = $object->getSingleSelectField(); + $dataArray['filter_groups'] = $values_1; + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values_2 = []; + foreach ($data->getSortings() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - if ($object->isInitialized('cardCoverImageField') && null !== $object->getCardCoverImageField()) { - $data['card_cover_image_field'] = $object->getCardCoverImageField(); + $dataArray['sortings'] = $values_2; + } + if ($data->isInitialized('groupBys') && null !== $data->getGroupBys()) { + $values_3 = []; + foreach ($data->getGroupBys() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); + $dataArray['group_bys'] = $values_3; + } + if ($data->isInitialized('decorations') && null !== $data->getDecorations()) { + $values_4 = []; + foreach ($data->getDecorations() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } + $dataArray['decorations'] = $values_4; + } + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); + } + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); + } + $dataArray['ownership_type'] = $data->getOwnershipType(); + if ($data->isInitialized('ownedById') && null !== $data->getOwnedById()) { + $dataArray['owned_by_id'] = $data->getOwnedById(); + } + if ($data->isInitialized('singleSelectField') && null !== $data->getSingleSelectField()) { + $dataArray['single_select_field'] = $data->getSingleSelectField(); + } + if ($data->isInitialized('cardCoverImageField') && null !== $data->getCardCoverImageField()) { + $dataArray['card_cover_image_field'] = $data->getCardCoverImageField(); + } + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_5; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\KanbanViewView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\KanbanViewView::class => false]; } } diff --git a/generated/Normalizer/LastModifiedByFieldCreateFieldNormalizer.php b/generated/Normalizer/LastModifiedByFieldCreateFieldNormalizer.php index c1f8553..9631446 100644 --- a/generated/Normalizer/LastModifiedByFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/LastModifiedByFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LastModifiedByFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LastModifiedByFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class LastModifiedByFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/LastModifiedByFieldFieldNormalizer.php b/generated/Normalizer/LastModifiedByFieldFieldNormalizer.php index ba92478..b040e06 100644 --- a/generated/Normalizer/LastModifiedByFieldFieldNormalizer.php +++ b/generated/Normalizer/LastModifiedByFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LastModifiedByFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LastModifiedByFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => false]; - } + return $object; } -} else { - class LastModifiedByFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldField::class => false]; } } diff --git a/generated/Normalizer/LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer.php index 6f4bcff..0124389 100644 --- a/generated/Normalizer/LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class LastModifiedByFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/LastModifiedByFieldUpdateFieldNormalizer.php b/generated/Normalizer/LastModifiedByFieldUpdateFieldNormalizer.php index a330ba1..1a4e952 100644 --- a/generated/Normalizer/LastModifiedByFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/LastModifiedByFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LastModifiedByFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LastModifiedByFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => false]; - } + return $object; } -} else { - class LastModifiedByFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LastModifiedByFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/LastModifiedFieldCreateFieldNormalizer.php b/generated/Normalizer/LastModifiedFieldCreateFieldNormalizer.php index 8c50589..b70f29d 100644 --- a/generated/Normalizer/LastModifiedFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/LastModifiedFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,253 +20,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LastModifiedFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LastModifiedFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); + unset($data['date_force_timezone_offset']); + } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => false]; - } + return $object; } -} else { - class LastModifiedFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('dateForceTimezoneOffset') && null !== $data->getDateForceTimezoneOffset()) { + $dataArray['date_force_timezone_offset'] = $data->getDateForceTimezoneOffset(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/LastModifiedFieldFieldNormalizer.php b/generated/Normalizer/LastModifiedFieldFieldNormalizer.php index 6985eba..1e368fb 100644 --- a/generated/Normalizer/LastModifiedFieldFieldNormalizer.php +++ b/generated/Normalizer/LastModifiedFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,277 +20,149 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LastModifiedFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LastModifiedFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => false]; - } + return $object; } -} else { - class LastModifiedFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldField::class => false]; } } diff --git a/generated/Normalizer/LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer.php index f813210..232b3b3 100644 --- a/generated/Normalizer/LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,297 +20,159 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class LastModifiedFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class === get_class($data); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/LastModifiedFieldUpdateFieldNormalizer.php b/generated/Normalizer/LastModifiedFieldUpdateFieldNormalizer.php index 2dadc14..baf2cca 100644 --- a/generated/Normalizer/LastModifiedFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/LastModifiedFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,257 +20,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LastModifiedFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LastModifiedFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data)) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } + if (\array_key_exists('date_include_time', $data)) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } + if (\array_key_exists('date_time_format', $data)) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } + if (\array_key_exists('date_show_tzinfo', $data)) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); + unset($data['date_force_timezone_offset']); + } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { + $object->setDateForceTimezoneOffset(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => false]; - } + return $object; } -} else { - class LastModifiedFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data)) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } - if (\array_key_exists('date_include_time', $data)) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } - if (\array_key_exists('date_time_format', $data)) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } - if (\array_key_exists('date_show_tzinfo', $data)) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('date_force_timezone_offset', $data) && null !== $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset($data['date_force_timezone_offset']); - unset($data['date_force_timezone_offset']); - } elseif (\array_key_exists('date_force_timezone_offset', $data) && null === $data['date_force_timezone_offset']) { - $object->setDateForceTimezoneOffset(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('dateForceTimezoneOffset') && null !== $object->getDateForceTimezoneOffset()) { - $data['date_force_timezone_offset'] = $object->getDateForceTimezoneOffset(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('dateForceTimezoneOffset') && null !== $data->getDateForceTimezoneOffset()) { + $dataArray['date_force_timezone_offset'] = $data->getDateForceTimezoneOffset(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LastModifiedFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/LicenseNormalizer.php b/generated/Normalizer/LicenseNormalizer.php index 46c46e8..90fc6a5 100644 --- a/generated/Normalizer/LicenseNormalizer.php +++ b/generated/Normalizer/LicenseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,251 +20,127 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LicenseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LicenseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\License::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\License::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\License::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\License::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\License(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('license_id', $data)) { - $object->setLicenseId($data['license_id']); - unset($data['license_id']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('last_check', $data) && null !== $data['last_check']) { - $object->setLastCheck(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_check'])); - unset($data['last_check']); - } elseif (\array_key_exists('last_check', $data) && null === $data['last_check']) { - $object->setLastCheck(null); - } - if (\array_key_exists('valid_from', $data)) { - $object->setValidFrom(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_from'])); - unset($data['valid_from']); - } - if (\array_key_exists('valid_through', $data)) { - $object->setValidThrough(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_through'])); - unset($data['valid_through']); - } - if (\array_key_exists('free_users_count', $data)) { - $object->setFreeUsersCount($data['free_users_count']); - unset($data['free_users_count']); - } - if (\array_key_exists('seats_taken', $data)) { - $object->setSeatsTaken($data['seats_taken']); - unset($data['seats_taken']); - } - if (\array_key_exists('seats', $data)) { - $object->setSeats($data['seats']); - unset($data['seats']); - } - if (\array_key_exists('product_code', $data)) { - $object->setProductCode($data['product_code']); - unset($data['product_code']); - } - if (\array_key_exists('issued_on', $data)) { - $object->setIssuedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['issued_on'])); - unset($data['issued_on']); - } - if (\array_key_exists('issued_to_email', $data)) { - $object->setIssuedToEmail($data['issued_to_email']); - unset($data['issued_to_email']); - } - if (\array_key_exists('issued_to_name', $data)) { - $object->setIssuedToName($data['issued_to_name']); - unset($data['issued_to_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\License(); + if (\array_key_exists('is_active', $data) && \is_int($data['is_active'])) { + $data['is_active'] = (bool) $data['is_active']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['license_id'] = $object->getLicenseId(); - $data['is_active'] = $object->getIsActive(); - if ($object->isInitialized('lastCheck') && null !== $object->getLastCheck()) { - $data['last_check'] = $object->getLastCheck()->format('Y-m-d\TH:i:sP'); - } - $data['valid_from'] = $object->getValidFrom()?->format('Y-m-d\TH:i:sP'); - $data['valid_through'] = $object->getValidThrough()?->format('Y-m-d\TH:i:sP'); - $data['seats'] = $object->getSeats(); - $data['product_code'] = $object->getProductCode(); - $data['issued_on'] = $object->getIssuedOn()?->format('Y-m-d\TH:i:sP'); - $data['issued_to_email'] = $object->getIssuedToEmail(); - $data['issued_to_name'] = $object->getIssuedToName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\License::class => false]; + if (\array_key_exists('license_id', $data)) { + $object->setLicenseId($data['license_id']); + unset($data['license_id']); } - } -} else { - class LicenseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\License::class === $type; + if (\array_key_exists('is_active', $data)) { + $object->setIsActive($data['is_active']); + unset($data['is_active']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\License::class === get_class($data); + if (\array_key_exists('last_check', $data) && null !== $data['last_check']) { + $object->setLastCheck(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_check'])); + unset($data['last_check']); + } elseif (\array_key_exists('last_check', $data) && null === $data['last_check']) { + $object->setLastCheck(null); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\License(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('license_id', $data)) { - $object->setLicenseId($data['license_id']); - unset($data['license_id']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('last_check', $data) && null !== $data['last_check']) { - $object->setLastCheck(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_check'])); - unset($data['last_check']); - } elseif (\array_key_exists('last_check', $data) && null === $data['last_check']) { - $object->setLastCheck(null); - } - if (\array_key_exists('valid_from', $data)) { - $object->setValidFrom(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_from'])); - unset($data['valid_from']); - } - if (\array_key_exists('valid_through', $data)) { - $object->setValidThrough(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_through'])); - unset($data['valid_through']); - } - if (\array_key_exists('free_users_count', $data)) { - $object->setFreeUsersCount($data['free_users_count']); - unset($data['free_users_count']); - } - if (\array_key_exists('seats_taken', $data)) { - $object->setSeatsTaken($data['seats_taken']); - unset($data['seats_taken']); - } - if (\array_key_exists('seats', $data)) { - $object->setSeats($data['seats']); - unset($data['seats']); - } - if (\array_key_exists('product_code', $data)) { - $object->setProductCode($data['product_code']); - unset($data['product_code']); - } - if (\array_key_exists('issued_on', $data)) { - $object->setIssuedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['issued_on'])); - unset($data['issued_on']); - } - if (\array_key_exists('issued_to_email', $data)) { - $object->setIssuedToEmail($data['issued_to_email']); - unset($data['issued_to_email']); - } - if (\array_key_exists('issued_to_name', $data)) { - $object->setIssuedToName($data['issued_to_name']); - unset($data['issued_to_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('valid_from', $data)) { + $object->setValidFrom(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_from'])); + unset($data['valid_from']); + } + if (\array_key_exists('valid_through', $data)) { + $object->setValidThrough(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_through'])); + unset($data['valid_through']); + } + if (\array_key_exists('free_users_count', $data)) { + $object->setFreeUsersCount($data['free_users_count']); + unset($data['free_users_count']); + } + if (\array_key_exists('seats_taken', $data)) { + $object->setSeatsTaken($data['seats_taken']); + unset($data['seats_taken']); + } + if (\array_key_exists('seats', $data)) { + $object->setSeats($data['seats']); + unset($data['seats']); + } + if (\array_key_exists('product_code', $data)) { + $object->setProductCode($data['product_code']); + unset($data['product_code']); + } + if (\array_key_exists('issued_on', $data)) { + $object->setIssuedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['issued_on'])); + unset($data['issued_on']); + } + if (\array_key_exists('issued_to_email', $data)) { + $object->setIssuedToEmail($data['issued_to_email']); + unset($data['issued_to_email']); + } + if (\array_key_exists('issued_to_name', $data)) { + $object->setIssuedToName($data['issued_to_name']); + unset($data['issued_to_name']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['license_id'] = $object->getLicenseId(); - $data['is_active'] = $object->getIsActive(); - if ($object->isInitialized('lastCheck') && null !== $object->getLastCheck()) { - $data['last_check'] = $object->getLastCheck()->format('Y-m-d\TH:i:sP'); - } - $data['valid_from'] = $object->getValidFrom()?->format('Y-m-d\TH:i:sP'); - $data['valid_through'] = $object->getValidThrough()?->format('Y-m-d\TH:i:sP'); - $data['seats'] = $object->getSeats(); - $data['product_code'] = $object->getProductCode(); - $data['issued_on'] = $object->getIssuedOn()?->format('Y-m-d\TH:i:sP'); - $data['issued_to_email'] = $object->getIssuedToEmail(); - $data['issued_to_name'] = $object->getIssuedToName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['license_id'] = $data->getLicenseId(); + $dataArray['is_active'] = $data->getIsActive(); + if ($data->isInitialized('lastCheck') && null !== $data->getLastCheck()) { + $dataArray['last_check'] = $data->getLastCheck()->format('Y-m-d\TH:i:sP'); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\License::class => false]; + $dataArray['valid_from'] = $data->getValidFrom()?->format('Y-m-d\TH:i:sP'); + $dataArray['valid_through'] = $data->getValidThrough()?->format('Y-m-d\TH:i:sP'); + $dataArray['seats'] = $data->getSeats(); + $dataArray['product_code'] = $data->getProductCode(); + $dataArray['issued_on'] = $data->getIssuedOn()?->format('Y-m-d\TH:i:sP'); + $dataArray['issued_to_email'] = $data->getIssuedToEmail(); + $dataArray['issued_to_name'] = $data->getIssuedToName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\License::class => false]; } } diff --git a/generated/Normalizer/LicenseUserLookupNormalizer.php b/generated/Normalizer/LicenseUserLookupNormalizer.php index 43ddccc..72e663e 100644 --- a/generated/Normalizer/LicenseUserLookupNormalizer.php +++ b/generated/Normalizer/LicenseUserLookupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,135 +20,66 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LicenseUserLookupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LicenseUserLookupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LicenseUserLookup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LicenseUserLookup(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => false]; + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); } - } -} else { - class LicenseUserLookupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LicenseUserLookup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class => false]; } } diff --git a/generated/Normalizer/LicenseUserNormalizer.php b/generated/Normalizer/LicenseUserNormalizer.php index 02eed68..3bb6358 100644 --- a/generated/Normalizer/LicenseUserNormalizer.php +++ b/generated/Normalizer/LicenseUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LicenseUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LicenseUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LicenseUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LicenseUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LicenseUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LicenseUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('email') && null !== $object->getEmail()) { - $data['email'] = $object->getEmail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LicenseUser::class => false]; - } + return $object; } -} else { - class LicenseUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LicenseUser::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseUser::class === get_class($data); + if ($data->isInitialized('email') && null !== $data->getEmail()) { + $dataArray['email'] = $data->getEmail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LicenseUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('email') && null !== $object->getEmail()) { - $data['email'] = $object->getEmail(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LicenseUser::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LicenseUser::class => false]; } } diff --git a/generated/Normalizer/LicenseWithUsersNormalizer.php b/generated/Normalizer/LicenseWithUsersNormalizer.php index 9c1a12c..a133d7e 100644 --- a/generated/Normalizer/LicenseWithUsersNormalizer.php +++ b/generated/Normalizer/LicenseWithUsersNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,267 +20,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LicenseWithUsersNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LicenseWithUsersNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LicenseWithUsers(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('license_id', $data)) { - $object->setLicenseId($data['license_id']); - unset($data['license_id']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('last_check', $data) && null !== $data['last_check']) { - $object->setLastCheck(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_check'])); - unset($data['last_check']); - } elseif (\array_key_exists('last_check', $data) && null === $data['last_check']) { - $object->setLastCheck(null); - } - if (\array_key_exists('valid_from', $data)) { - $object->setValidFrom(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_from'])); - unset($data['valid_from']); - } - if (\array_key_exists('valid_through', $data)) { - $object->setValidThrough(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_through'])); - unset($data['valid_through']); - } - if (\array_key_exists('free_users_count', $data)) { - $object->setFreeUsersCount($data['free_users_count']); - unset($data['free_users_count']); - } - if (\array_key_exists('seats_taken', $data)) { - $object->setSeatsTaken($data['seats_taken']); - unset($data['seats_taken']); - } - if (\array_key_exists('seats', $data)) { - $object->setSeats($data['seats']); - unset($data['seats']); - } - if (\array_key_exists('product_code', $data)) { - $object->setProductCode($data['product_code']); - unset($data['product_code']); - } - if (\array_key_exists('issued_on', $data)) { - $object->setIssuedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['issued_on'])); - unset($data['issued_on']); - } - if (\array_key_exists('issued_to_email', $data)) { - $object->setIssuedToEmail($data['issued_to_email']); - unset($data['issued_to_email']); - } - if (\array_key_exists('issued_to_name', $data)) { - $object->setIssuedToName($data['issued_to_name']); - unset($data['issued_to_name']); - } - if (\array_key_exists('users', $data)) { - $values = []; - foreach ($data['users'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LicenseUser::class, 'json', $context); - } - $object->setUsers($values); - unset($data['users']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LicenseWithUsers(); + if (\array_key_exists('is_active', $data) && \is_int($data['is_active'])) { + $data['is_active'] = (bool) $data['is_active']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['license_id'] = $object->getLicenseId(); - $data['is_active'] = $object->getIsActive(); - if ($object->isInitialized('lastCheck') && null !== $object->getLastCheck()) { - $data['last_check'] = $object->getLastCheck()->format('Y-m-d\TH:i:sP'); - } - $data['valid_from'] = $object->getValidFrom()?->format('Y-m-d\TH:i:sP'); - $data['valid_through'] = $object->getValidThrough()?->format('Y-m-d\TH:i:sP'); - $data['seats'] = $object->getSeats(); - $data['product_code'] = $object->getProductCode(); - $data['issued_on'] = $object->getIssuedOn()?->format('Y-m-d\TH:i:sP'); - $data['issued_to_email'] = $object->getIssuedToEmail(); - $data['issued_to_name'] = $object->getIssuedToName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => false]; + if (\array_key_exists('license_id', $data)) { + $object->setLicenseId($data['license_id']); + unset($data['license_id']); } - } -} else { - class LicenseWithUsersNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class === $type; + if (\array_key_exists('is_active', $data)) { + $object->setIsActive($data['is_active']); + unset($data['is_active']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class === get_class($data); + if (\array_key_exists('last_check', $data) && null !== $data['last_check']) { + $object->setLastCheck(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_check'])); + unset($data['last_check']); + } elseif (\array_key_exists('last_check', $data) && null === $data['last_check']) { + $object->setLastCheck(null); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LicenseWithUsers(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('license_id', $data)) { - $object->setLicenseId($data['license_id']); - unset($data['license_id']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('last_check', $data) && null !== $data['last_check']) { - $object->setLastCheck(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_check'])); - unset($data['last_check']); - } elseif (\array_key_exists('last_check', $data) && null === $data['last_check']) { - $object->setLastCheck(null); - } - if (\array_key_exists('valid_from', $data)) { - $object->setValidFrom(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_from'])); - unset($data['valid_from']); - } - if (\array_key_exists('valid_through', $data)) { - $object->setValidThrough(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_through'])); - unset($data['valid_through']); - } - if (\array_key_exists('free_users_count', $data)) { - $object->setFreeUsersCount($data['free_users_count']); - unset($data['free_users_count']); - } - if (\array_key_exists('seats_taken', $data)) { - $object->setSeatsTaken($data['seats_taken']); - unset($data['seats_taken']); - } - if (\array_key_exists('seats', $data)) { - $object->setSeats($data['seats']); - unset($data['seats']); - } - if (\array_key_exists('product_code', $data)) { - $object->setProductCode($data['product_code']); - unset($data['product_code']); - } - if (\array_key_exists('issued_on', $data)) { - $object->setIssuedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['issued_on'])); - unset($data['issued_on']); - } - if (\array_key_exists('issued_to_email', $data)) { - $object->setIssuedToEmail($data['issued_to_email']); - unset($data['issued_to_email']); - } - if (\array_key_exists('issued_to_name', $data)) { - $object->setIssuedToName($data['issued_to_name']); - unset($data['issued_to_name']); - } - if (\array_key_exists('users', $data)) { - $values = []; - foreach ($data['users'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LicenseUser::class, 'json', $context); - } - $object->setUsers($values); - unset($data['users']); + if (\array_key_exists('valid_from', $data)) { + $object->setValidFrom(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_from'])); + unset($data['valid_from']); + } + if (\array_key_exists('valid_through', $data)) { + $object->setValidThrough(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['valid_through'])); + unset($data['valid_through']); + } + if (\array_key_exists('free_users_count', $data)) { + $object->setFreeUsersCount($data['free_users_count']); + unset($data['free_users_count']); + } + if (\array_key_exists('seats_taken', $data)) { + $object->setSeatsTaken($data['seats_taken']); + unset($data['seats_taken']); + } + if (\array_key_exists('seats', $data)) { + $object->setSeats($data['seats']); + unset($data['seats']); + } + if (\array_key_exists('product_code', $data)) { + $object->setProductCode($data['product_code']); + unset($data['product_code']); + } + if (\array_key_exists('issued_on', $data)) { + $object->setIssuedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['issued_on'])); + unset($data['issued_on']); + } + if (\array_key_exists('issued_to_email', $data)) { + $object->setIssuedToEmail($data['issued_to_email']); + unset($data['issued_to_email']); + } + if (\array_key_exists('issued_to_name', $data)) { + $object->setIssuedToName($data['issued_to_name']); + unset($data['issued_to_name']); + } + if (\array_key_exists('users', $data)) { + $values = []; + foreach ($data['users'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LicenseUser::class, 'json', $context); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $object->setUsers($values); + unset($data['users']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['license_id'] = $object->getLicenseId(); - $data['is_active'] = $object->getIsActive(); - if ($object->isInitialized('lastCheck') && null !== $object->getLastCheck()) { - $data['last_check'] = $object->getLastCheck()->format('Y-m-d\TH:i:sP'); - } - $data['valid_from'] = $object->getValidFrom()?->format('Y-m-d\TH:i:sP'); - $data['valid_through'] = $object->getValidThrough()?->format('Y-m-d\TH:i:sP'); - $data['seats'] = $object->getSeats(); - $data['product_code'] = $object->getProductCode(); - $data['issued_on'] = $object->getIssuedOn()?->format('Y-m-d\TH:i:sP'); - $data['issued_to_email'] = $object->getIssuedToEmail(); - $data['issued_to_name'] = $object->getIssuedToName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['license_id'] = $data->getLicenseId(); + $dataArray['is_active'] = $data->getIsActive(); + if ($data->isInitialized('lastCheck') && null !== $data->getLastCheck()) { + $dataArray['last_check'] = $data->getLastCheck()->format('Y-m-d\TH:i:sP'); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => false]; + $dataArray['valid_from'] = $data->getValidFrom()?->format('Y-m-d\TH:i:sP'); + $dataArray['valid_through'] = $data->getValidThrough()?->format('Y-m-d\TH:i:sP'); + $dataArray['seats'] = $data->getSeats(); + $dataArray['product_code'] = $data->getProductCode(); + $dataArray['issued_on'] = $data->getIssuedOn()?->format('Y-m-d\TH:i:sP'); + $dataArray['issued_to_email'] = $data->getIssuedToEmail(); + $dataArray['issued_to_name'] = $data->getIssuedToName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LicenseWithUsers::class => false]; } } diff --git a/generated/Normalizer/LinkElementCreateElementNormalizer.php b/generated/Normalizer/LinkElementCreateElementNormalizer.php index b89f490..0620b1b 100644 --- a/generated/Normalizer/LinkElementCreateElementNormalizer.php +++ b/generated/Normalizer/LinkElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,693 +20,345 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('variant', $data)) { - $object->setVariant($data['variant']); - unset($data['variant']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('variant') && null !== $object->getVariant()) { - $data['variant'] = $object->getVariant(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('navigation_type', $data)) { + $object->setNavigationType($data['navigation_type']); + unset($data['navigation_type']); + } + if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { + $object->setNavigateToPageId($data['navigate_to_page_id']); + unset($data['navigate_to_page_id']); + } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { + $object->setNavigateToPageId(null); + } + if (\array_key_exists('navigate_to_url', $data)) { + $object->setNavigateToUrl($data['navigate_to_url']); + unset($data['navigate_to_url']); + } + if (\array_key_exists('page_parameters', $data)) { + $values = []; + foreach ($data['page_parameters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPageParameters($values); + unset($data['page_parameters']); + } + if (\array_key_exists('target', $data)) { + $object->setTarget($data['target']); + unset($data['target']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('variant', $data)) { + $object->setVariant($data['variant']); + unset($data['variant']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => false]; - } + return $object; } -} else { - class LinkElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('variant', $data)) { - $object->setVariant($data['variant']); - unset($data['variant']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('variant') && null !== $object->getVariant()) { - $data['variant'] = $object->getVariant(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('navigationType') && null !== $data->getNavigationType()) { + $dataArray['navigation_type'] = $data->getNavigationType(); + } + if ($data->isInitialized('navigateToPageId') && null !== $data->getNavigateToPageId()) { + $dataArray['navigate_to_page_id'] = $data->getNavigateToPageId(); + } + if ($data->isInitialized('navigateToUrl') && null !== $data->getNavigateToUrl()) { + $dataArray['navigate_to_url'] = $data->getNavigateToUrl(); + } + if ($data->isInitialized('pageParameters') && null !== $data->getPageParameters()) { + $values = []; + foreach ($data->getPageParameters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['page_parameters'] = $values; + } + if ($data->isInitialized('target') && null !== $data->getTarget()) { + $dataArray['target'] = $data->getTarget(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('variant') && null !== $data->getVariant()) { + $dataArray['variant'] = $data->getVariant(); + } + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/LinkElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/LinkElementCreateElementStyleBackgroundFileNormalizer.php index 0505b6d..7064882 100644 --- a/generated/Normalizer/LinkElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/LinkElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class LinkElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/LinkElementElementNormalizer.php b/generated/Normalizer/LinkElementElementNormalizer.php index b50c3c0..73e1541 100644 --- a/generated/Normalizer/LinkElementElementNormalizer.php +++ b/generated/Normalizer/LinkElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,723 +20,360 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('variant', $data)) { - $object->setVariant($data['variant']); - unset($data['variant']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('variant') && null !== $object->getVariant()) { - $data['variant'] = $object->getVariant(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('navigation_type', $data)) { + $object->setNavigationType($data['navigation_type']); + unset($data['navigation_type']); + } + if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { + $object->setNavigateToPageId($data['navigate_to_page_id']); + unset($data['navigate_to_page_id']); + } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { + $object->setNavigateToPageId(null); + } + if (\array_key_exists('navigate_to_url', $data)) { + $object->setNavigateToUrl($data['navigate_to_url']); + unset($data['navigate_to_url']); + } + if (\array_key_exists('page_parameters', $data)) { + $values = []; + foreach ($data['page_parameters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPageParameters($values); + unset($data['page_parameters']); + } + if (\array_key_exists('target', $data)) { + $object->setTarget($data['target']); + unset($data['target']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('variant', $data)) { + $object->setVariant($data['variant']); + unset($data['variant']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementElement::class => false]; - } + return $object; } -} else { - class LinkElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('variant', $data)) { - $object->setVariant($data['variant']); - unset($data['variant']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('variant') && null !== $object->getVariant()) { - $data['variant'] = $object->getVariant(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('navigationType') && null !== $data->getNavigationType()) { + $dataArray['navigation_type'] = $data->getNavigationType(); + } + if ($data->isInitialized('navigateToPageId') && null !== $data->getNavigateToPageId()) { + $dataArray['navigate_to_page_id'] = $data->getNavigateToPageId(); + } + if ($data->isInitialized('navigateToUrl') && null !== $data->getNavigateToUrl()) { + $dataArray['navigate_to_url'] = $data->getNavigateToUrl(); + } + if ($data->isInitialized('pageParameters') && null !== $data->getPageParameters()) { + $values = []; + foreach ($data->getPageParameters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['page_parameters'] = $values; + } + if ($data->isInitialized('target') && null !== $data->getTarget()) { + $dataArray['target'] = $data->getTarget(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('variant') && null !== $data->getVariant()) { + $dataArray['variant'] = $data->getVariant(); + } + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkElementElement::class => false]; } } diff --git a/generated/Normalizer/LinkElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/LinkElementElementStyleBackgroundFileNormalizer.php index 468e02f..20808fb 100644 --- a/generated/Normalizer/LinkElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/LinkElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class LinkElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/LinkElementPublicElementNormalizer.php b/generated/Normalizer/LinkElementPublicElementNormalizer.php index dd89851..2182f9a 100644 --- a/generated/Normalizer/LinkElementPublicElementNormalizer.php +++ b/generated/Normalizer/LinkElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,715 +20,356 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('variant', $data)) { - $object->setVariant($data['variant']); - unset($data['variant']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('variant') && null !== $object->getVariant()) { - $data['variant'] = $object->getVariant(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('navigation_type', $data)) { + $object->setNavigationType($data['navigation_type']); + unset($data['navigation_type']); + } + if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { + $object->setNavigateToPageId($data['navigate_to_page_id']); + unset($data['navigate_to_page_id']); + } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { + $object->setNavigateToPageId(null); + } + if (\array_key_exists('navigate_to_url', $data)) { + $object->setNavigateToUrl($data['navigate_to_url']); + unset($data['navigate_to_url']); + } + if (\array_key_exists('page_parameters', $data)) { + $values = []; + foreach ($data['page_parameters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPageParameters($values); + unset($data['page_parameters']); + } + if (\array_key_exists('target', $data)) { + $object->setTarget($data['target']); + unset($data['target']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('variant', $data)) { + $object->setVariant($data['variant']); + unset($data['variant']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => false]; - } + return $object; } -} else { - class LinkElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('variant', $data)) { - $object->setVariant($data['variant']); - unset($data['variant']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('variant') && null !== $object->getVariant()) { - $data['variant'] = $object->getVariant(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('navigationType') && null !== $data->getNavigationType()) { + $dataArray['navigation_type'] = $data->getNavigationType(); + } + if ($data->isInitialized('navigateToPageId') && null !== $data->getNavigateToPageId()) { + $dataArray['navigate_to_page_id'] = $data->getNavigateToPageId(); + } + if ($data->isInitialized('navigateToUrl') && null !== $data->getNavigateToUrl()) { + $dataArray['navigate_to_url'] = $data->getNavigateToUrl(); + } + if ($data->isInitialized('pageParameters') && null !== $data->getPageParameters()) { + $values = []; + foreach ($data->getPageParameters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['page_parameters'] = $values; + } + if ($data->isInitialized('target') && null !== $data->getTarget()) { + $dataArray['target'] = $data->getTarget(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('variant') && null !== $data->getVariant()) { + $dataArray['variant'] = $data->getVariant(); + } + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/LinkElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/LinkElementPublicElementStyleBackgroundFileNormalizer.php index c36474e..faa7ffb 100644 --- a/generated/Normalizer/LinkElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/LinkElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class LinkElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/LinkElementUpdateElementNormalizer.php b/generated/Normalizer/LinkElementUpdateElementNormalizer.php index 3b1c439..5dace1e 100644 --- a/generated/Normalizer/LinkElementUpdateElementNormalizer.php +++ b/generated/Normalizer/LinkElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,661 +20,329 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('variant', $data)) { - $object->setVariant($data['variant']); - unset($data['variant']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('variant') && null !== $object->getVariant()) { - $data['variant'] = $object->getVariant(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('navigation_type', $data)) { + $object->setNavigationType($data['navigation_type']); + unset($data['navigation_type']); + } + if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { + $object->setNavigateToPageId($data['navigate_to_page_id']); + unset($data['navigate_to_page_id']); + } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { + $object->setNavigateToPageId(null); + } + if (\array_key_exists('navigate_to_url', $data)) { + $object->setNavigateToUrl($data['navigate_to_url']); + unset($data['navigate_to_url']); + } + if (\array_key_exists('page_parameters', $data)) { + $values = []; + foreach ($data['page_parameters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPageParameters($values); + unset($data['page_parameters']); + } + if (\array_key_exists('target', $data)) { + $object->setTarget($data['target']); + unset($data['target']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('variant', $data)) { + $object->setVariant($data['variant']); + unset($data['variant']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('button_color', $data)) { + $object->setButtonColor($data['button_color']); + unset($data['button_color']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => false]; - } + return $object; } -} else { - class LinkElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonLinkConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('variant', $data)) { - $object->setVariant($data['variant']); - unset($data['variant']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('button_color', $data)) { - $object->setButtonColor($data['button_color']); - unset($data['button_color']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('variant') && null !== $object->getVariant()) { - $data['variant'] = $object->getVariant(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('buttonColor') && null !== $object->getButtonColor()) { - $data['button_color'] = $object->getButtonColor(); + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('navigationType') && null !== $data->getNavigationType()) { + $dataArray['navigation_type'] = $data->getNavigationType(); + } + if ($data->isInitialized('navigateToPageId') && null !== $data->getNavigateToPageId()) { + $dataArray['navigate_to_page_id'] = $data->getNavigateToPageId(); + } + if ($data->isInitialized('navigateToUrl') && null !== $data->getNavigateToUrl()) { + $dataArray['navigate_to_url'] = $data->getNavigateToUrl(); + } + if ($data->isInitialized('pageParameters') && null !== $data->getPageParameters()) { + $values = []; + foreach ($data->getPageParameters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['page_parameters'] = $values; + } + if ($data->isInitialized('target') && null !== $data->getTarget()) { + $dataArray['target'] = $data->getTarget(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('variant') && null !== $data->getVariant()) { + $dataArray['variant'] = $data->getVariant(); + } + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('buttonColor') && null !== $data->getButtonColor()) { + $dataArray['button_color'] = $data->getButtonColor(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/LinkElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/LinkElementUpdateElementStyleBackgroundFileNormalizer.php index 11bf857..b6d035f 100644 --- a/generated/Normalizer/LinkElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/LinkElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class LinkElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/LinkRowFieldCreateFieldNormalizer.php b/generated/Normalizer/LinkRowFieldCreateFieldNormalizer.php index d7bacd3..c09b0ec 100644 --- a/generated/Normalizer/LinkRowFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/LinkRowFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,225 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkRowFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkRowFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { - $object->setLinkRowTableId($data['link_row_table_id']); - unset($data['link_row_table_id']); - } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { - $object->setLinkRowTableId(null); - } - if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { - $object->setLinkRowTable($data['link_row_table']); - unset($data['link_row_table']); - } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { - $object->setLinkRowTable(null); - } - if (\array_key_exists('has_related_field', $data)) { - $object->setHasRelatedField($data['has_related_field']); - unset($data['has_related_field']); - } - if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); - unset($data['link_row_limit_selection_view_id']); - } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField(); + if (\array_key_exists('has_related_field', $data) && \is_int($data['has_related_field'])) { + $data['has_related_field'] = (bool) $data['has_related_field']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('linkRowTableId') && null !== $object->getLinkRowTableId()) { - $data['link_row_table_id'] = $object->getLinkRowTableId(); - } - if ($object->isInitialized('linkRowTable') && null !== $object->getLinkRowTable()) { - $data['link_row_table'] = $object->getLinkRowTable(); - } - if ($object->isInitialized('hasRelatedField') && null !== $object->getHasRelatedField()) { - $data['has_related_field'] = $object->getHasRelatedField(); - } - if ($object->isInitialized('linkRowLimitSelectionViewId') && null !== $object->getLinkRowLimitSelectionViewId()) { - $data['link_row_limit_selection_view_id'] = $object->getLinkRowLimitSelectionViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { + $object->setLinkRowTableId($data['link_row_table_id']); + unset($data['link_row_table_id']); + } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { + $object->setLinkRowTableId(null); + } + if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { + $object->setLinkRowTable($data['link_row_table']); + unset($data['link_row_table']); + } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { + $object->setLinkRowTable(null); + } + if (\array_key_exists('has_related_field', $data)) { + $object->setHasRelatedField($data['has_related_field']); + unset($data['has_related_field']); + } + if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { + $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); + unset($data['link_row_limit_selection_view_id']); + } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { + $object->setLinkRowLimitSelectionViewId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => false]; - } + return $object; } -} else { - class LinkRowFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class === get_class($data); + if ($data->isInitialized('linkRowTableId') && null !== $data->getLinkRowTableId()) { + $dataArray['link_row_table_id'] = $data->getLinkRowTableId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { - $object->setLinkRowTableId($data['link_row_table_id']); - unset($data['link_row_table_id']); - } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { - $object->setLinkRowTableId(null); - } - if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { - $object->setLinkRowTable($data['link_row_table']); - unset($data['link_row_table']); - } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { - $object->setLinkRowTable(null); - } - if (\array_key_exists('has_related_field', $data)) { - $object->setHasRelatedField($data['has_related_field']); - unset($data['has_related_field']); - } - if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); - unset($data['link_row_limit_selection_view_id']); - } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('linkRowTable') && null !== $data->getLinkRowTable()) { + $dataArray['link_row_table'] = $data->getLinkRowTable(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('linkRowTableId') && null !== $object->getLinkRowTableId()) { - $data['link_row_table_id'] = $object->getLinkRowTableId(); - } - if ($object->isInitialized('linkRowTable') && null !== $object->getLinkRowTable()) { - $data['link_row_table'] = $object->getLinkRowTable(); - } - if ($object->isInitialized('hasRelatedField') && null !== $object->getHasRelatedField()) { - $data['has_related_field'] = $object->getHasRelatedField(); - } - if ($object->isInitialized('linkRowLimitSelectionViewId') && null !== $object->getLinkRowLimitSelectionViewId()) { - $data['link_row_limit_selection_view_id'] = $object->getLinkRowLimitSelectionViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('hasRelatedField') && null !== $data->getHasRelatedField()) { + $dataArray['has_related_field'] = $data->getHasRelatedField(); + } + if ($data->isInitialized('linkRowLimitSelectionViewId') && null !== $data->getLinkRowLimitSelectionViewId()) { + $dataArray['link_row_limit_selection_view_id'] = $data->getLinkRowLimitSelectionViewId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/LinkRowFieldFieldNormalizer.php b/generated/Normalizer/LinkRowFieldFieldNormalizer.php index 0642357..4b0f025 100644 --- a/generated/Normalizer/LinkRowFieldFieldNormalizer.php +++ b/generated/Normalizer/LinkRowFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,277 +20,143 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkRowFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkRowFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { - $object->setLinkRowTableId($data['link_row_table_id']); - unset($data['link_row_table_id']); - } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { - $object->setLinkRowTableId(null); - } - if (\array_key_exists('link_row_related_field_id', $data) && null !== $data['link_row_related_field_id']) { - $object->setLinkRowRelatedFieldId($data['link_row_related_field_id']); - unset($data['link_row_related_field_id']); - } elseif (\array_key_exists('link_row_related_field_id', $data) && null === $data['link_row_related_field_id']) { - $object->setLinkRowRelatedFieldId(null); - } - if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { - $object->setLinkRowTable($data['link_row_table']); - unset($data['link_row_table']); - } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { - $object->setLinkRowTable(null); - } - if (\array_key_exists('link_row_related_field', $data)) { - $object->setLinkRowRelatedField($data['link_row_related_field']); - unset($data['link_row_related_field']); - } - if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); - unset($data['link_row_limit_selection_view_id']); - } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('linkRowTableId') && null !== $object->getLinkRowTableId()) { - $data['link_row_table_id'] = $object->getLinkRowTableId(); - } - if ($object->isInitialized('linkRowTable') && null !== $object->getLinkRowTable()) { - $data['link_row_table'] = $object->getLinkRowTable(); - } - if ($object->isInitialized('linkRowLimitSelectionViewId') && null !== $object->getLinkRowLimitSelectionViewId()) { - $data['link_row_limit_selection_view_id'] = $object->getLinkRowLimitSelectionViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { + $object->setLinkRowTableId($data['link_row_table_id']); + unset($data['link_row_table_id']); + } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { + $object->setLinkRowTableId(null); + } + if (\array_key_exists('link_row_related_field_id', $data) && null !== $data['link_row_related_field_id']) { + $object->setLinkRowRelatedFieldId($data['link_row_related_field_id']); + unset($data['link_row_related_field_id']); + } elseif (\array_key_exists('link_row_related_field_id', $data) && null === $data['link_row_related_field_id']) { + $object->setLinkRowRelatedFieldId(null); + } + if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { + $object->setLinkRowTable($data['link_row_table']); + unset($data['link_row_table']); + } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { + $object->setLinkRowTable(null); + } + if (\array_key_exists('link_row_related_field', $data)) { + $object->setLinkRowRelatedField($data['link_row_related_field']); + unset($data['link_row_related_field']); + } + if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { + $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); + unset($data['link_row_limit_selection_view_id']); + } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { + $object->setLinkRowLimitSelectionViewId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => false]; - } + return $object; } -} else { - class LinkRowFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { - $object->setLinkRowTableId($data['link_row_table_id']); - unset($data['link_row_table_id']); - } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { - $object->setLinkRowTableId(null); - } - if (\array_key_exists('link_row_related_field_id', $data) && null !== $data['link_row_related_field_id']) { - $object->setLinkRowRelatedFieldId($data['link_row_related_field_id']); - unset($data['link_row_related_field_id']); - } elseif (\array_key_exists('link_row_related_field_id', $data) && null === $data['link_row_related_field_id']) { - $object->setLinkRowRelatedFieldId(null); - } - if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { - $object->setLinkRowTable($data['link_row_table']); - unset($data['link_row_table']); - } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { - $object->setLinkRowTable(null); - } - if (\array_key_exists('link_row_related_field', $data)) { - $object->setLinkRowRelatedField($data['link_row_related_field']); - unset($data['link_row_related_field']); - } - if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); - unset($data['link_row_limit_selection_view_id']); - } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('linkRowTableId') && null !== $data->getLinkRowTableId()) { + $dataArray['link_row_table_id'] = $data->getLinkRowTableId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('linkRowTableId') && null !== $object->getLinkRowTableId()) { - $data['link_row_table_id'] = $object->getLinkRowTableId(); - } - if ($object->isInitialized('linkRowTable') && null !== $object->getLinkRowTable()) { - $data['link_row_table'] = $object->getLinkRowTable(); - } - if ($object->isInitialized('linkRowLimitSelectionViewId') && null !== $object->getLinkRowLimitSelectionViewId()) { - $data['link_row_limit_selection_view_id'] = $object->getLinkRowLimitSelectionViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('linkRowTable') && null !== $data->getLinkRowTable()) { + $dataArray['link_row_table'] = $data->getLinkRowTable(); + } + if ($data->isInitialized('linkRowLimitSelectionViewId') && null !== $data->getLinkRowLimitSelectionViewId()) { + $dataArray['link_row_limit_selection_view_id'] = $data->getLinkRowLimitSelectionViewId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldField::class => false]; } } diff --git a/generated/Normalizer/LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer.php index 03e9253..4d79b37 100644 --- a/generated/Normalizer/LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,293 +20,151 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { - $object->setLinkRowTableId($data['link_row_table_id']); - unset($data['link_row_table_id']); - } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { - $object->setLinkRowTableId(null); - } - if (\array_key_exists('link_row_related_field_id', $data) && null !== $data['link_row_related_field_id']) { - $object->setLinkRowRelatedFieldId($data['link_row_related_field_id']); - unset($data['link_row_related_field_id']); - } elseif (\array_key_exists('link_row_related_field_id', $data) && null === $data['link_row_related_field_id']) { - $object->setLinkRowRelatedFieldId(null); - } - if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { - $object->setLinkRowTable($data['link_row_table']); - unset($data['link_row_table']); - } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { - $object->setLinkRowTable(null); - } - if (\array_key_exists('link_row_related_field', $data)) { - $object->setLinkRowRelatedField($data['link_row_related_field']); - unset($data['link_row_related_field']); - } - if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); - unset($data['link_row_limit_selection_view_id']); - } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('linkRowTableId') && null !== $object->getLinkRowTableId()) { - $data['link_row_table_id'] = $object->getLinkRowTableId(); - } - if ($object->isInitialized('linkRowTable') && null !== $object->getLinkRowTable()) { - $data['link_row_table'] = $object->getLinkRowTable(); - } - if ($object->isInitialized('linkRowLimitSelectionViewId') && null !== $object->getLinkRowLimitSelectionViewId()) { - $data['link_row_limit_selection_view_id'] = $object->getLinkRowLimitSelectionViewId(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { + $object->setLinkRowTableId($data['link_row_table_id']); + unset($data['link_row_table_id']); + } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { + $object->setLinkRowTableId(null); + } + if (\array_key_exists('link_row_related_field_id', $data) && null !== $data['link_row_related_field_id']) { + $object->setLinkRowRelatedFieldId($data['link_row_related_field_id']); + unset($data['link_row_related_field_id']); + } elseif (\array_key_exists('link_row_related_field_id', $data) && null === $data['link_row_related_field_id']) { + $object->setLinkRowRelatedFieldId(null); + } + if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { + $object->setLinkRowTable($data['link_row_table']); + unset($data['link_row_table']); + } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { + $object->setLinkRowTable(null); + } + if (\array_key_exists('link_row_related_field', $data)) { + $object->setLinkRowRelatedField($data['link_row_related_field']); + unset($data['link_row_related_field']); + } + if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { + $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); + unset($data['link_row_limit_selection_view_id']); + } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { + $object->setLinkRowLimitSelectionViewId(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class LinkRowFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { - $object->setLinkRowTableId($data['link_row_table_id']); - unset($data['link_row_table_id']); - } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { - $object->setLinkRowTableId(null); - } - if (\array_key_exists('link_row_related_field_id', $data) && null !== $data['link_row_related_field_id']) { - $object->setLinkRowRelatedFieldId($data['link_row_related_field_id']); - unset($data['link_row_related_field_id']); - } elseif (\array_key_exists('link_row_related_field_id', $data) && null === $data['link_row_related_field_id']) { - $object->setLinkRowRelatedFieldId(null); - } - if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { - $object->setLinkRowTable($data['link_row_table']); - unset($data['link_row_table']); - } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { - $object->setLinkRowTable(null); - } - if (\array_key_exists('link_row_related_field', $data)) { - $object->setLinkRowRelatedField($data['link_row_related_field']); - unset($data['link_row_related_field']); - } - if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); - unset($data['link_row_limit_selection_view_id']); - } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('linkRowTableId') && null !== $data->getLinkRowTableId()) { + $dataArray['link_row_table_id'] = $data->getLinkRowTableId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('linkRowTableId') && null !== $object->getLinkRowTableId()) { - $data['link_row_table_id'] = $object->getLinkRowTableId(); - } - if ($object->isInitialized('linkRowTable') && null !== $object->getLinkRowTable()) { - $data['link_row_table'] = $object->getLinkRowTable(); - } - if ($object->isInitialized('linkRowLimitSelectionViewId') && null !== $object->getLinkRowLimitSelectionViewId()) { - $data['link_row_limit_selection_view_id'] = $object->getLinkRowLimitSelectionViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('linkRowTable') && null !== $data->getLinkRowTable()) { + $dataArray['link_row_table'] = $data->getLinkRowTable(); + } + if ($data->isInitialized('linkRowLimitSelectionViewId') && null !== $data->getLinkRowLimitSelectionViewId()) { + $dataArray['link_row_limit_selection_view_id'] = $data->getLinkRowLimitSelectionViewId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/LinkRowFieldUpdateFieldNormalizer.php b/generated/Normalizer/LinkRowFieldUpdateFieldNormalizer.php index 1208d9e..abf1796 100644 --- a/generated/Normalizer/LinkRowFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/LinkRowFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,233 +20,118 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkRowFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkRowFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { - $object->setLinkRowTableId($data['link_row_table_id']); - unset($data['link_row_table_id']); - } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { - $object->setLinkRowTableId(null); - } - if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { - $object->setLinkRowTable($data['link_row_table']); - unset($data['link_row_table']); - } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { - $object->setLinkRowTable(null); - } - if (\array_key_exists('has_related_field', $data)) { - $object->setHasRelatedField($data['has_related_field']); - unset($data['has_related_field']); - } - if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); - unset($data['link_row_limit_selection_view_id']); - } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField(); + if (\array_key_exists('has_related_field', $data) && \is_int($data['has_related_field'])) { + $data['has_related_field'] = (bool) $data['has_related_field']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('linkRowTableId') && null !== $object->getLinkRowTableId()) { - $data['link_row_table_id'] = $object->getLinkRowTableId(); - } - if ($object->isInitialized('linkRowTable') && null !== $object->getLinkRowTable()) { - $data['link_row_table'] = $object->getLinkRowTable(); - } - if ($object->isInitialized('hasRelatedField') && null !== $object->getHasRelatedField()) { - $data['has_related_field'] = $object->getHasRelatedField(); - } - if ($object->isInitialized('linkRowLimitSelectionViewId') && null !== $object->getLinkRowLimitSelectionViewId()) { - $data['link_row_limit_selection_view_id'] = $object->getLinkRowLimitSelectionViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { + $object->setLinkRowTableId($data['link_row_table_id']); + unset($data['link_row_table_id']); + } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { + $object->setLinkRowTableId(null); + } + if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { + $object->setLinkRowTable($data['link_row_table']); + unset($data['link_row_table']); + } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { + $object->setLinkRowTable(null); + } + if (\array_key_exists('has_related_field', $data)) { + $object->setHasRelatedField($data['has_related_field']); + unset($data['has_related_field']); + } + if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { + $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); + unset($data['link_row_limit_selection_view_id']); + } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { + $object->setLinkRowLimitSelectionViewId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => false]; - } + return $object; } -} else { - class LinkRowFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('link_row_table_id', $data) && null !== $data['link_row_table_id']) { - $object->setLinkRowTableId($data['link_row_table_id']); - unset($data['link_row_table_id']); - } elseif (\array_key_exists('link_row_table_id', $data) && null === $data['link_row_table_id']) { - $object->setLinkRowTableId(null); - } - if (\array_key_exists('link_row_table', $data) && null !== $data['link_row_table']) { - $object->setLinkRowTable($data['link_row_table']); - unset($data['link_row_table']); - } elseif (\array_key_exists('link_row_table', $data) && null === $data['link_row_table']) { - $object->setLinkRowTable(null); - } - if (\array_key_exists('has_related_field', $data)) { - $object->setHasRelatedField($data['has_related_field']); - unset($data['has_related_field']); - } - if (\array_key_exists('link_row_limit_selection_view_id', $data) && null !== $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId($data['link_row_limit_selection_view_id']); - unset($data['link_row_limit_selection_view_id']); - } elseif (\array_key_exists('link_row_limit_selection_view_id', $data) && null === $data['link_row_limit_selection_view_id']) { - $object->setLinkRowLimitSelectionViewId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('linkRowTableId') && null !== $object->getLinkRowTableId()) { - $data['link_row_table_id'] = $object->getLinkRowTableId(); - } - if ($object->isInitialized('linkRowTable') && null !== $object->getLinkRowTable()) { - $data['link_row_table'] = $object->getLinkRowTable(); - } - if ($object->isInitialized('hasRelatedField') && null !== $object->getHasRelatedField()) { - $data['has_related_field'] = $object->getHasRelatedField(); - } - if ($object->isInitialized('linkRowLimitSelectionViewId') && null !== $object->getLinkRowLimitSelectionViewId()) { - $data['link_row_limit_selection_view_id'] = $object->getLinkRowLimitSelectionViewId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('linkRowTableId') && null !== $data->getLinkRowTableId()) { + $dataArray['link_row_table_id'] = $data->getLinkRowTableId(); + } + if ($data->isInitialized('linkRowTable') && null !== $data->getLinkRowTable()) { + $dataArray['link_row_table'] = $data->getLinkRowTable(); + } + if ($data->isInitialized('hasRelatedField') && null !== $data->getHasRelatedField()) { + $dataArray['has_related_field'] = $data->getHasRelatedField(); + } + if ($data->isInitialized('linkRowLimitSelectionViewId') && null !== $data->getLinkRowLimitSelectionViewId()) { + $dataArray['link_row_limit_selection_view_id'] = $data->getLinkRowLimitSelectionViewId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkRowFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/LinkRowValueNormalizer.php b/generated/Normalizer/LinkRowValueNormalizer.php index be42f85..7bd0017 100644 --- a/generated/Normalizer/LinkRowValueNormalizer.php +++ b/generated/Normalizer/LinkRowValueNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,141 +20,69 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkRowValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkRowValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkRowValue::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowValue::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowValue::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowValue::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowValue(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkRowValue(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowValue::class => false]; - } + return $object; } -} else { - class LinkRowValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkRowValue::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkRowValue::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkRowValue(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkRowValue::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkRowValue::class => false]; } } diff --git a/generated/Normalizer/LinkThemeConfigBlockNormalizer.php b/generated/Normalizer/LinkThemeConfigBlockNormalizer.php index 612ed0f..1ada839 100644 --- a/generated/Normalizer/LinkThemeConfigBlockNormalizer.php +++ b/generated/Normalizer/LinkThemeConfigBlockNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,189 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LinkThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LinkThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('link_font_family', $data)) { + $object->setLinkFontFamily($data['link_font_family']); + unset($data['link_font_family']); + } + if (\array_key_exists('link_font_size', $data)) { + $object->setLinkFontSize($data['link_font_size']); + unset($data['link_font_size']); + } + if (\array_key_exists('link_text_alignment', $data)) { + $object->setLinkTextAlignment($data['link_text_alignment']); + unset($data['link_text_alignment']); + } + if (\array_key_exists('link_text_color', $data)) { + $object->setLinkTextColor($data['link_text_color']); + unset($data['link_text_color']); + } + if (\array_key_exists('link_hover_text_color', $data)) { + $object->setLinkHoverTextColor($data['link_hover_text_color']); + unset($data['link_hover_text_color']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => false]; - } + return $object; } -} else { - class LinkThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('linkFontFamily') && null !== $data->getLinkFontFamily()) { + $dataArray['link_font_family'] = $data->getLinkFontFamily(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class === get_class($data); + if ($data->isInitialized('linkFontSize') && null !== $data->getLinkFontSize()) { + $dataArray['link_font_size'] = $data->getLinkFontSize(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('linkTextAlignment') && null !== $data->getLinkTextAlignment()) { + $dataArray['link_text_alignment'] = $data->getLinkTextAlignment(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('linkTextColor') && null !== $data->getLinkTextColor()) { + $dataArray['link_text_color'] = $data->getLinkTextColor(); + } + if ($data->isInitialized('linkHoverTextColor') && null !== $data->getLinkHoverTextColor()) { + $dataArray['link_hover_text_color'] = $data->getLinkHoverTextColor(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LinkThemeConfigBlock::class => false]; } } diff --git a/generated/Normalizer/ListWorkspaceUsersWithMemberDataNormalizer.php b/generated/Normalizer/ListWorkspaceUsersWithMemberDataNormalizer.php index 33f574a..596db13 100644 --- a/generated/Normalizer/ListWorkspaceUsersWithMemberDataNormalizer.php +++ b/generated/Normalizer/ListWorkspaceUsersWithMemberDataNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,269 +20,136 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ListWorkspaceUsersWithMemberDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ListWorkspaceUsersWithMemberDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('user_id', $data)) { - $object->setUserId($data['user_id']); - unset($data['user_id']); - } - if (\array_key_exists('to_be_deleted', $data)) { - $object->setToBeDeleted($data['to_be_deleted']); - unset($data['to_be_deleted']); - } - if (\array_key_exists('teams', $data)) { - $values = []; - foreach ($data['teams'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class, 'json', $context); - } - $object->setTeams($values); - unset($data['teams']); - } - if (\array_key_exists('role_uid', $data) && null !== $data['role_uid']) { - $object->setRoleUid($data['role_uid']); - unset($data['role_uid']); - } elseif (\array_key_exists('role_uid', $data) && null === $data['role_uid']) { - $object->setRoleUid(null); - } - if (\array_key_exists('highest_role_uid', $data) && null !== $data['highest_role_uid']) { - $object->setHighestRoleUid($data['highest_role_uid']); - unset($data['highest_role_uid']); - } elseif (\array_key_exists('highest_role_uid', $data) && null === $data['highest_role_uid']) { - $object->setHighestRoleUid(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData(); + if (\array_key_exists('to_be_deleted', $data) && \is_int($data['to_be_deleted'])) { + $data['to_be_deleted'] = (bool) $data['to_be_deleted']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - $data['to_be_deleted'] = $object->getToBeDeleted(); - if ($object->isInitialized('teams') && null !== $object->getTeams()) { - $values = []; - foreach ($object->getTeams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['teams'] = $values; - } - if ($object->isInitialized('roleUid') && null !== $object->getRoleUid()) { - $data['role_uid'] = $object->getRoleUid(); - } - if ($object->isInitialized('highestRoleUid') && null !== $object->getHighestRoleUid()) { - $data['highest_role_uid'] = $object->getHighestRoleUid(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class ListWorkspaceUsersWithMemberDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class === $type; + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class === get_class($data); + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('user_id', $data)) { - $object->setUserId($data['user_id']); - unset($data['user_id']); - } - if (\array_key_exists('to_be_deleted', $data)) { - $object->setToBeDeleted($data['to_be_deleted']); - unset($data['to_be_deleted']); - } - if (\array_key_exists('teams', $data)) { - $values = []; - foreach ($data['teams'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class, 'json', $context); - } - $object->setTeams($values); - unset($data['teams']); - } - if (\array_key_exists('role_uid', $data) && null !== $data['role_uid']) { - $object->setRoleUid($data['role_uid']); - unset($data['role_uid']); - } elseif (\array_key_exists('role_uid', $data) && null === $data['role_uid']) { - $object->setRoleUid(null); - } - if (\array_key_exists('highest_role_uid', $data) && null !== $data['highest_role_uid']) { - $object->setHighestRoleUid($data['highest_role_uid']); - unset($data['highest_role_uid']); - } elseif (\array_key_exists('highest_role_uid', $data) && null === $data['highest_role_uid']) { - $object->setHighestRoleUid(null); + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); + } + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('user_id', $data)) { + $object->setUserId($data['user_id']); + unset($data['user_id']); + } + if (\array_key_exists('to_be_deleted', $data)) { + $object->setToBeDeleted($data['to_be_deleted']); + unset($data['to_be_deleted']); + } + if (\array_key_exists('teams', $data)) { + $values = []; + foreach ($data['teams'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class, 'json', $context); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $object->setTeams($values); + unset($data['teams']); + } + if (\array_key_exists('role_uid', $data) && null !== $data['role_uid']) { + $object->setRoleUid($data['role_uid']); + unset($data['role_uid']); + } elseif (\array_key_exists('role_uid', $data) && null === $data['role_uid']) { + $object->setRoleUid(null); + } + if (\array_key_exists('highest_role_uid', $data) && null !== $data['highest_role_uid']) { + $object->setHighestRoleUid($data['highest_role_uid']); + unset($data['highest_role_uid']); + } elseif (\array_key_exists('highest_role_uid', $data) && null === $data['highest_role_uid']) { + $object->setHighestRoleUid(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - $data['to_be_deleted'] = $object->getToBeDeleted(); - if ($object->isInitialized('teams') && null !== $object->getTeams()) { - $values = []; - foreach ($object->getTeams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['teams'] = $values; - } - if ($object->isInitialized('roleUid') && null !== $object->getRoleUid()) { - $data['role_uid'] = $object->getRoleUid(); - } - if ($object->isInitialized('highestRoleUid') && null !== $object->getHighestRoleUid()) { - $data['highest_role_uid'] = $object->getHighestRoleUid(); + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['group'] = $data->getGroup(); + $dataArray['workspace'] = $data->getWorkspace(); + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $data->getPermissions(); + } + $dataArray['to_be_deleted'] = $data->getToBeDeleted(); + if ($data->isInitialized('teams') && null !== $data->getTeams()) { + $values = []; + foreach ($data->getTeams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['teams'] = $values; + } + if ($data->isInitialized('roleUid') && null !== $data->getRoleUid()) { + $dataArray['role_uid'] = $data->getRoleUid(); + } + if ($data->isInitialized('highestRoleUid') && null !== $data->getHighestRoleUid()) { + $dataArray['highest_role_uid'] = $data->getHighestRoleUid(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ListWorkspaceUsersWithMemberData::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowContextDataNormalizer.php b/generated/Normalizer/LocalBaserowContextDataNormalizer.php index e821c39..ce0dfc7 100644 --- a/generated/Normalizer/LocalBaserowContextDataNormalizer.php +++ b/generated/Normalizer/LocalBaserowContextDataNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('databases', $data)) { - $values = []; - foreach ($data['databases'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); - } - $object->setDatabases($values); - unset($data['databases']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('databases', $data)) { $values = []; - foreach ($object->getDatabases() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['databases'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); } - $data['databases'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setDatabases($values); + unset($data['databases']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => false]; - } + return $object; } -} else { - class LocalBaserowContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getDatabases() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['databases'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowContextData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('databases', $data)) { - $values = []; - foreach ($data['databases'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); - } - $object->setDatabases($values); - unset($data['databases']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getDatabases() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['databases'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowContextData::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer.php b/generated/Normalizer/LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer.php index bcb3d2f..3be4ddc 100644 --- a/generated/Normalizer/LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,177 +20,87 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - $data['service'] = $object->getService(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class LocalBaserowCreateRowWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class === $type; + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('service', $data)) { + $object->setService($data['service']); + unset($data['service']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - $data['service'] = $object->getService(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['order'] = $data->getOrder(); + $dataArray['event'] = $data->getEvent(); + $dataArray['service'] = $data->getService(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer.php b/generated/Normalizer/LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer.php index a6d3479..acf7fd9 100644 --- a/generated/Normalizer/LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,179 +20,88 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('service') && null !== $object->getService()) { - $data['service'] = $object->getService(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('service', $data)) { + $object->setService($data['service']); + unset($data['service']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + return $object; } -} else { - class LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('elementId') && null !== $data->getElementId()) { + $dataArray['element_id'] = $data->getElementId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + $dataArray['type'] = $data->getType(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('service') && null !== $data->getService()) { + $dataArray['service'] = $data->getService(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('service') && null !== $object->getService()) { - $data['service'] = $object->getService(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionCreateBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php b/generated/Normalizer/LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php index 164df80..63fb081 100644 --- a/generated/Normalizer/LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php +++ b/generated/Normalizer/LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('service') && null !== $object->getService()) { - $data['service'] = $object->getService(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('service', $data)) { + $object->setService($data['service']); + unset($data['service']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + return $object; } -} else { - class LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + if ($data->isInitialized('service') && null !== $data->getService()) { + $dataArray['service'] = $data->getService(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('service') && null !== $object->getService()) { - $data['service'] = $object->getService(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowCreateRowWorkflowActionUpdateBuilderWorkflowActions::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowFieldNormalizer.php b/generated/Normalizer/LocalBaserowFieldNormalizer.php index 0bf4530..02f2e31 100644 --- a/generated/Normalizer/LocalBaserowFieldNormalizer.php +++ b/generated/Normalizer/LocalBaserowFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,153 +20,75 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => false]; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - } -} else { - class LocalBaserowFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowField::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowGetRowCreateDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowGetRowCreateDataSourceNormalizer.php index 72c4c07..a14871d 100644 --- a/generated/Normalizer/LocalBaserowGetRowCreateDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowGetRowCreateDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,275 +20,136 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowGetRowCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowGetRowCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - unset($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { - $object->setPageId(null); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('pageId') && null !== $object->getPageId()) { - $data['page_id'] = $object->getPageId(); - } - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + unset($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { + $object->setPageId(null); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFilters($values); + unset($data['filters']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowGetRowCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class === get_class($data); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - unset($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { - $object->setPageId(null); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('pageId') && null !== $data->getPageId()) { + $dataArray['page_id'] = $data->getPageId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('pageId') && null !== $object->getPageId()) { - $data['page_id'] = $object->getPageId(); - } - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); + } + $dataArray['row_id'] = $data->getRowId(); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['filters'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowCreateDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowGetRowDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowGetRowDataSourceNormalizer.php index a4457e2..297c7e1 100644 --- a/generated/Normalizer/LocalBaserowGetRowDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowGetRowDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,317 +20,157 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowGetRowDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowGetRowDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values_3 = []; - foreach ($data['filters'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_3); - unset($data['filters']); - } - foreach ($data as $key_3 => $value_4) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_4; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource(); + if (\array_key_exists('order', $data) && \is_int($data['order'])) { + $data['order'] = (float) $data['order']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('schema', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['schema'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + $object->setSchema($values); + unset($data['schema']); + } + if (\array_key_exists('context_data', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setContextData($values_1); + unset($data['context_data']); + } + if (\array_key_exists('context_data_schema', $data)) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data_schema'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - - return $data; + $object->setContextDataSchema($values_2); + unset($data['context_data_schema']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class LocalBaserowGetRowDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class === $type; + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values_3 = []; - foreach ($data['filters'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_3); - unset($data['filters']); + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('filters', $data)) { + $values_3 = []; + foreach ($data['filters'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($data as $key_3 => $value_4) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_4; - } + $object->setFilters($values_3); + unset($data['filters']); + } + foreach ($data as $key_3 => $value_4) { + if (preg_match('/.*/', (string) $key_3)) { + $object[$key_3] = $value_4; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['row_id'] = $data->getRowId(); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['filters'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowGetRowNormalizer.php b/generated/Normalizer/LocalBaserowGetRowNormalizer.php index e1226ac..28dbff0 100644 --- a/generated/Normalizer/LocalBaserowGetRowNormalizer.php +++ b/generated/Normalizer/LocalBaserowGetRowNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,149 +20,73 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowGetRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowGetRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFilters($values); + unset($data['filters']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => false]; - } + return $object; } -} else { - class LocalBaserowGetRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class === get_class($data); - } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - return $object; + $dataArray['filters'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRow::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowGetRowPublicDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowGetRowPublicDataSourceNormalizer.php index 98d70ef..fe7534a 100644 --- a/generated/Normalizer/LocalBaserowGetRowPublicDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowGetRowPublicDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,273 +20,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowGetRowPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowGetRowPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('context_data', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key => $value) { - $values[$key] = $value; - } - $object->setContextData($values); - unset($data['context_data']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values_1 = []; - foreach ($data['filters'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_1); - unset($data['filters']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource(); + if (\array_key_exists('order', $data) && \is_int($data['order'])) { + $data['order'] = (float) $data['order']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('context_data', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + $object->setContextData($values); + unset($data['context_data']); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('filters', $data)) { + $values_1 = []; + foreach ($data['filters'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFilters($values_1); + unset($data['filters']); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowGetRowPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['row_id'] = $data->getRowId(); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class === get_class($data); + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('context_data', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key => $value) { - $values[$key] = $value; - } - $object->setContextData($values); - unset($data['context_data']); + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values_1 = []; - foreach ($data['filters'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_1); - unset($data['filters']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - - return $object; + $dataArray['filters'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowPublicDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowGetRowServiceNormalizer.php b/generated/Normalizer/LocalBaserowGetRowServiceNormalizer.php index d1260fa..a8c3e17 100644 --- a/generated/Normalizer/LocalBaserowGetRowServiceNormalizer.php +++ b/generated/Normalizer/LocalBaserowGetRowServiceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,287 +20,142 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowGetRowServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowGetRowServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values_3 = []; - foreach ($data['filters'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_3); - unset($data['filters']); - } - foreach ($data as $key_3 => $value_4) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_4; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('schema', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['schema'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + $object->setSchema($values); + unset($data['schema']); + } + if (\array_key_exists('context_data', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setContextData($values_1); + unset($data['context_data']); + } + if (\array_key_exists('context_data_schema', $data)) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data_schema'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - - return $data; + $object->setContextDataSchema($values_2); + unset($data['context_data_schema']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => false]; + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); } - } -} else { - class LocalBaserowGetRowServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class === $type; + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class === get_class($data); + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values_3 = []; - foreach ($data['filters'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_3); - unset($data['filters']); + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('filters', $data)) { + $values_3 = []; + foreach ($data['filters'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($data as $key_3 => $value_4) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_4; - } + $object->setFilters($values_3); + unset($data['filters']); + } + foreach ($data as $key_3 => $value_4) { + if (preg_match('/.*/', (string) $key_3)) { + $object[$key_3] = $value_4; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['row_id'] = $data->getRowId(); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['filters'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowService::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowGetRowUpdateDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowGetRowUpdateDataSourceNormalizer.php index cc35f06..dc7ef23 100644 --- a/generated/Normalizer/LocalBaserowGetRowUpdateDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowGetRowUpdateDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,120 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowGetRowUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowGetRowUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFilters($values); + unset($data['filters']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowGetRowUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class === get_class($data); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + $dataArray['row_id'] = $data->getRowId(); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['filters'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowGetRowUpdateDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer.php index 0058960..b951734 100644 --- a/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => false]; + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); } - } -} else { - class LocalBaserowIntegrationCreateIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class === $type; + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class === get_class($data); + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationContextDataNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationContextDataNormalizer.php index 6fd0a89..0335938 100644 --- a/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationContextDataNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationContextDataNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationCreateIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationCreateIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('databases', $data)) { - $values = []; - foreach ($data['databases'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); - } - $object->setDatabases($values); - unset($data['databases']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('databases', $data)) { $values = []; - foreach ($object->getDatabases() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['databases'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); } - $data['databases'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setDatabases($values); + unset($data['databases']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => false]; - } + return $object; } -} else { - class LocalBaserowIntegrationCreateIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getDatabases() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['databases'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('databases', $data)) { - $values = []; - foreach ($data['databases'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); - } - $object->setDatabases($values); - unset($data['databases']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getDatabases() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['databases'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationNormalizer.php index ddd8a02..ee6147f 100644 --- a/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationCreateIntegrationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,169 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationCreateIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationCreateIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('context_data', $data)) { - $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class, 'json', $context)); - unset($data['context_data']); - } - if (\array_key_exists('authorized_user', $data)) { - $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class, 'json', $context)); - unset($data['authorized_user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class LocalBaserowIntegrationCreateIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class === get_class($data); + if (\array_key_exists('context_data', $data)) { + $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class, 'json', $context)); + unset($data['context_data']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('context_data', $data)) { - $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationContextData::class, 'json', $context)); - unset($data['context_data']); - } - if (\array_key_exists('authorized_user', $data)) { - $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class, 'json', $context)); - unset($data['authorized_user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('authorized_user', $data)) { + $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegrationAuthorizedUser::class, 'json', $context)); + unset($data['authorized_user']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => false]; + $dataArray['type'] = $data->getType(); + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationCreateIntegration::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer.php index cf10288..3dd427e 100644 --- a/generated/Normalizer/LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => false]; + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); } - } -} else { - class LocalBaserowIntegrationIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class === $type; + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class === get_class($data); + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationIntegrationContextDataNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationIntegrationContextDataNormalizer.php index a14bbef..b91d7f4 100644 --- a/generated/Normalizer/LocalBaserowIntegrationIntegrationContextDataNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationIntegrationContextDataNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('databases', $data)) { - $values = []; - foreach ($data['databases'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); - } - $object->setDatabases($values); - unset($data['databases']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('databases', $data)) { $values = []; - foreach ($object->getDatabases() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['databases'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); } - $data['databases'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setDatabases($values); + unset($data['databases']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => false]; - } + return $object; } -} else { - class LocalBaserowIntegrationIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getDatabases() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['databases'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('databases', $data)) { - $values = []; - foreach ($data['databases'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); - } - $object->setDatabases($values); - unset($data['databases']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getDatabases() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['databases'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationIntegrationNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationIntegrationNormalizer.php index 14f0144..ad627d4 100644 --- a/generated/Normalizer/LocalBaserowIntegrationIntegrationNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationIntegrationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('application_id', $data)) { - $object->setApplicationId($data['application_id']); - unset($data['application_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('context_data', $data)) { - $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class, 'json', $context)); - unset($data['context_data']); - } - if (\array_key_exists('authorized_user', $data)) { - $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class, 'json', $context)); - unset($data['authorized_user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => false]; + if (\array_key_exists('application_id', $data)) { + $object->setApplicationId($data['application_id']); + unset($data['application_id']); } - } -} else { - class LocalBaserowIntegrationIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class === $type; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class === get_class($data); + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('application_id', $data)) { - $object->setApplicationId($data['application_id']); - unset($data['application_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('context_data', $data)) { - $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class, 'json', $context)); - unset($data['context_data']); - } - if (\array_key_exists('authorized_user', $data)) { - $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class, 'json', $context)); - unset($data['authorized_user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('context_data', $data)) { + $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationContextData::class, 'json', $context)); + unset($data['context_data']); + } + if (\array_key_exists('authorized_user', $data)) { + $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegrationAuthorizedUser::class, 'json', $context)); + unset($data['authorized_user']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationIntegration::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer.php index 7a12c50..8c8b7bc 100644 --- a/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => false]; + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); } - } -} else { - class LocalBaserowIntegrationUpdateIntegrationAuthorizedUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class === $type; + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class === get_class($data); + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer.php index a00c8e9..2c61541 100644 --- a/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('databases', $data)) { - $values = []; - foreach ($data['databases'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); - } - $object->setDatabases($values); - unset($data['databases']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('databases', $data)) { $values = []; - foreach ($object->getDatabases() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['databases'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); } - $data['databases'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setDatabases($values); + unset($data['databases']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => false]; - } + return $object; } -} else { - class LocalBaserowIntegrationUpdateIntegrationContextDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getDatabases() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['databases'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('databases', $data)) { - $values = []; - foreach ($data['databases'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\DatabaseApplication::class, 'json', $context); - } - $object->setDatabases($values); - unset($data['databases']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getDatabases() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['databases'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationNormalizer.php b/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationNormalizer.php index da1e4c5..62312e5 100644 --- a/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationNormalizer.php +++ b/generated/Normalizer/LocalBaserowIntegrationUpdateIntegrationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,149 +20,73 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowIntegrationUpdateIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowIntegrationUpdateIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('context_data', $data)) { - $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class, 'json', $context)); - unset($data['context_data']); - } - if (\array_key_exists('authorized_user', $data)) { - $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class, 'json', $context)); - unset($data['authorized_user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => false]; + if (\array_key_exists('context_data', $data)) { + $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class, 'json', $context)); + unset($data['context_data']); } - } -} else { - class LocalBaserowIntegrationUpdateIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class === $type; + if (\array_key_exists('authorized_user', $data)) { + $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class, 'json', $context)); + unset($data['authorized_user']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('context_data', $data)) { - $object->setContextData($this->denormalizer->denormalize($data['context_data'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationContextData::class, 'json', $context)); - unset($data['context_data']); - } - if (\array_key_exists('authorized_user', $data)) { - $object->setAuthorizedUser($this->denormalizer->denormalize($data['authorized_user'], \CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegrationAuthorizedUser::class, 'json', $context)); - unset($data['authorized_user']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowIntegrationUpdateIntegration::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowListRowsCreateDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowListRowsCreateDataSourceNormalizer.php index fa28225..278bd5f 100644 --- a/generated/Normalizer/LocalBaserowListRowsCreateDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowListRowsCreateDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,295 +20,146 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowListRowsCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowListRowsCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - unset($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { - $object->setPageId(null); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values = []; - foreach ($data['sortings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values); - unset($data['sortings']); - } - if (\array_key_exists('filters', $data)) { - $values_1 = []; - foreach ($data['filters'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_1); - unset($data['filters']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('pageId') && null !== $object->getPageId()) { - $data['page_id'] = $object->getPageId(); - } - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + unset($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { + $object->setPageId(null); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('sortings', $data)) { + $values = []; + foreach ($data['sortings'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $object->setSortings($values); + unset($data['sortings']); + } + if (\array_key_exists('filters', $data)) { + $values_1 = []; + foreach ($data['filters'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setFilters($values_1); + unset($data['filters']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowListRowsCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class === get_class($data); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - unset($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { - $object->setPageId(null); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values = []; - foreach ($data['sortings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values); - unset($data['sortings']); - } - if (\array_key_exists('filters', $data)) { - $values_1 = []; - foreach ($data['filters'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_1); - unset($data['filters']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; + if ($data->isInitialized('pageId') && null !== $data->getPageId()) { + $dataArray['page_id'] = $data->getPageId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('pageId') && null !== $object->getPageId()) { - $data['page_id'] = $object->getPageId(); - } - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); + } + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values = []; + foreach ($data->getSortings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $dataArray['sortings'] = $values; + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values_1 = []; + foreach ($data->getFilters() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $dataArray['filters'] = $values_1; + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsCreateDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowListRowsDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowListRowsDataSourceNormalizer.php index 04d730e..b9fe8df 100644 --- a/generated/Normalizer/LocalBaserowListRowsDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowListRowsDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,337 +20,167 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowListRowsDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowListRowsDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values_3 = []; - foreach ($data['sortings'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values_3); - unset($data['sortings']); - } - if (\array_key_exists('filters', $data)) { - $values_4 = []; - foreach ($data['filters'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_4); - unset($data['filters']); - } - foreach ($data as $key_3 => $value_5) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_5; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource(); + if (\array_key_exists('order', $data) && \is_int($data['order'])) { + $data['order'] = (float) $data['order']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('schema', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['schema'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $object->setSchema($values); + unset($data['schema']); + } + if (\array_key_exists('context_data', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setContextData($values_1); + unset($data['context_data']); + } + if (\array_key_exists('context_data_schema', $data)) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data_schema'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - - return $data; + $object->setContextDataSchema($values_2); + unset($data['context_data_schema']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class LocalBaserowListRowsDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class === $type; + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values_3 = []; - foreach ($data['sortings'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values_3); - unset($data['sortings']); + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('sortings', $data)) { + $values_3 = []; + foreach ($data['sortings'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); } - if (\array_key_exists('filters', $data)) { - $values_4 = []; - foreach ($data['filters'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_4); - unset($data['filters']); + $object->setSortings($values_3); + unset($data['sortings']); + } + if (\array_key_exists('filters', $data)) { + $values_4 = []; + foreach ($data['filters'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($data as $key_3 => $value_5) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_5; - } + $object->setFilters($values_4); + unset($data['filters']); + } + foreach ($data as $key_3 => $value_5) { + if (preg_match('/.*/', (string) $key_3)) { + $object[$key_3] = $value_5; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values = []; + foreach ($data->getSortings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $dataArray['sortings'] = $values; + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values_1 = []; + foreach ($data->getFilters() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $dataArray['filters'] = $values_1; + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowListRowsNormalizer.php b/generated/Normalizer/LocalBaserowListRowsNormalizer.php index ba9eae7..2b067d9 100644 --- a/generated/Normalizer/LocalBaserowListRowsNormalizer.php +++ b/generated/Normalizer/LocalBaserowListRowsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,179 +20,88 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowListRowsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowListRowsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('sortings', $data)) { - $values_1 = []; - foreach ($data['sortings'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values_1); - unset($data['sortings']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_1 = []; - foreach ($object->getSortings() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['sortings'] = $values_1; + $object->setFilters($values); + unset($data['filters']); + } + if (\array_key_exists('sortings', $data)) { + $values_1 = []; + foreach ($data['sortings'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setSortings($values_1); + unset($data['sortings']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => false]; - } + return $object; } -} else { - class LocalBaserowListRowsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class === get_class($data); - } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRows(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('sortings', $data)) { - $values_1 = []; - foreach ($data['sortings'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values_1); - unset($data['sortings']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - return $object; + $dataArray['filters'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values_1 = []; + foreach ($data->getSortings() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_1 = []; - foreach ($object->getSortings() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['sortings'] = $values_1; - } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $dataArray['sortings'] = $values_1; + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRows::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowListRowsPublicDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowListRowsPublicDataSourceNormalizer.php index 94e6d58..b29a813 100644 --- a/generated/Normalizer/LocalBaserowListRowsPublicDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowListRowsPublicDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,293 +20,145 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowListRowsPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowListRowsPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('context_data', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key => $value) { - $values[$key] = $value; - } - $object->setContextData($values); - unset($data['context_data']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values_1 = []; - foreach ($data['sortings'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values_1); - unset($data['sortings']); - } - if (\array_key_exists('filters', $data)) { - $values_2 = []; - foreach ($data['filters'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_2); - unset($data['filters']); - } - foreach ($data as $key_1 => $value_3) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource(); + if (\array_key_exists('order', $data) && \is_int($data['order'])) { + $data['order'] = (float) $data['order']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('context_data', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + $object->setContextData($values); + unset($data['context_data']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('sortings', $data)) { + $values_1 = []; + foreach ($data['sortings'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $object->setSortings($values_1); + unset($data['sortings']); + } + if (\array_key_exists('filters', $data)) { + $values_2 = []; + foreach ($data['filters'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setFilters($values_2); + unset($data['filters']); + } + foreach ($data as $key_1 => $value_3) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowListRowsPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class === get_class($data); + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('context_data', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key => $value) { - $values[$key] = $value; - } - $object->setContextData($values); - unset($data['context_data']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values = []; + foreach ($data->getSortings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values_1 = []; - foreach ($data['sortings'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values_1); - unset($data['sortings']); - } - if (\array_key_exists('filters', $data)) { - $values_2 = []; - foreach ($data['filters'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_2); - unset($data['filters']); - } - foreach ($data as $key_1 => $value_3) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_3; - } - } - - return $object; + $dataArray['sortings'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values_1 = []; + foreach ($data->getFilters() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; - } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $dataArray['filters'] = $values_1; + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsPublicDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowListRowsServiceNormalizer.php b/generated/Normalizer/LocalBaserowListRowsServiceNormalizer.php index 4da069a..784d88e 100644 --- a/generated/Normalizer/LocalBaserowListRowsServiceNormalizer.php +++ b/generated/Normalizer/LocalBaserowListRowsServiceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,307 +20,152 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowListRowsServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowListRowsServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values_3 = []; - foreach ($data['sortings'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values_3); - unset($data['sortings']); - } - if (\array_key_exists('filters', $data)) { - $values_4 = []; - foreach ($data['filters'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_4); - unset($data['filters']); - } - foreach ($data as $key_3 => $value_5) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_5; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('schema', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['schema'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $object->setSchema($values); + unset($data['schema']); + } + if (\array_key_exists('context_data', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setContextData($values_1); + unset($data['context_data']); + } + if (\array_key_exists('context_data_schema', $data)) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data_schema'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - - return $data; + $object->setContextDataSchema($values_2); + unset($data['context_data_schema']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => false]; + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); } - } -} else { - class LocalBaserowListRowsServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class === $type; + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class === get_class($data); + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values_3 = []; - foreach ($data['sortings'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values_3); - unset($data['sortings']); + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('sortings', $data)) { + $values_3 = []; + foreach ($data['sortings'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); } - if (\array_key_exists('filters', $data)) { - $values_4 = []; - foreach ($data['filters'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_4); - unset($data['filters']); + $object->setSortings($values_3); + unset($data['sortings']); + } + if (\array_key_exists('filters', $data)) { + $values_4 = []; + foreach ($data['filters'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($data as $key_3 => $value_5) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_5; - } + $object->setFilters($values_4); + unset($data['filters']); + } + foreach ($data as $key_3 => $value_5) { + if (preg_match('/.*/', (string) $key_3)) { + $object[$key_3] = $value_5; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values = []; + foreach ($data->getSortings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $dataArray['sortings'] = $values; + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values_1 = []; + foreach ($data->getFilters() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $dataArray['filters'] = $values_1; + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsService::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowListRowsUpdateDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowListRowsUpdateDataSourceNormalizer.php index 6d4236b..7a74996 100644 --- a/generated/Normalizer/LocalBaserowListRowsUpdateDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowListRowsUpdateDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,263 +20,130 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowListRowsUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowListRowsUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values = []; - foreach ($data['sortings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values); - unset($data['sortings']); - } - if (\array_key_exists('filters', $data)) { - $values_1 = []; - foreach ($data['filters'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_1); - unset($data['filters']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { + $object->setViewId($data['view_id']); + unset($data['view_id']); + } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { + $object->setViewId(null); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('search_query', $data)) { + $object->setSearchQuery($data['search_query']); + unset($data['search_query']); + } + if (\array_key_exists('sortings', $data)) { + $values = []; + foreach ($data['sortings'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $object->setSortings($values); + unset($data['sortings']); + } + if (\array_key_exists('filters', $data)) { + $values_1 = []; + foreach ($data['filters'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setFilters($values_1); + unset($data['filters']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowListRowsUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class === get_class($data); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('view_id', $data) && null !== $data['view_id']) { - $object->setViewId($data['view_id']); - unset($data['view_id']); - } elseif (\array_key_exists('view_id', $data) && null === $data['view_id']) { - $object->setViewId(null); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('search_query', $data)) { - $object->setSearchQuery($data['search_query']); - unset($data['search_query']); - } - if (\array_key_exists('sortings', $data)) { - $values = []; - foreach ($data['sortings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class, 'json', $context); - } - $object->setSortings($values); - unset($data['sortings']); - } - if (\array_key_exists('filters', $data)) { - $values_1 = []; - foreach ($data['filters'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class, 'json', $context); - } - $object->setFilters($values_1); - unset($data['filters']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('searchQuery') && null !== $object->getSearchQuery()) { - $data['search_query'] = $object->getSearchQuery(); - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values = []; - foreach ($object->getSortings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['sortings'] = $values; + if ($data->isInitialized('searchQuery') && null !== $data->getSearchQuery()) { + $dataArray['search_query'] = $data->getSearchQuery(); + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values = []; + foreach ($data->getSortings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values_1 = []; - foreach ($object->getFilters() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filters'] = $values_1; + $dataArray['sortings'] = $values; + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values_1 = []; + foreach ($data->getFilters() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $dataArray['filters'] = $values_1; + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowListRowsUpdateDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer.php b/generated/Normalizer/LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer.php index 00ee05e..85204f6 100644 --- a/generated/Normalizer/LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer.php +++ b/generated/Normalizer/LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('password_field_id', $data) && null !== $data['password_field_id']) { - $object->setPasswordFieldId($data['password_field_id']); - unset($data['password_field_id']); - } elseif (\array_key_exists('password_field_id', $data) && null === $data['password_field_id']) { - $object->setPasswordFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('passwordFieldId') && null !== $object->getPasswordFieldId()) { - $data['password_field_id'] = $object->getPasswordFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + unset($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('password_field_id', $data) && null !== $data['password_field_id']) { + $object->setPasswordFieldId($data['password_field_id']); + unset($data['password_field_id']); + } elseif (\array_key_exists('password_field_id', $data) && null === $data['password_field_id']) { + $object->setPasswordFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => false]; - } + return $object; } -} else { - class LocalBaserowPasswordAppAuthProviderAppAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('domain') && null !== $data->getDomain()) { + $dataArray['domain'] = $data->getDomain(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class === get_class($data); + if ($data->isInitialized('passwordFieldId') && null !== $data->getPasswordFieldId()) { + $dataArray['password_field_id'] = $data->getPasswordFieldId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('password_field_id', $data) && null !== $data['password_field_id']) { - $object->setPasswordFieldId($data['password_field_id']); - unset($data['password_field_id']); - } elseif (\array_key_exists('password_field_id', $data) && null === $data['password_field_id']) { - $object->setPasswordFieldId(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('passwordFieldId') && null !== $object->getPasswordFieldId()) { - $data['password_field_id'] = $object->getPasswordFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderAppAuthProvider::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer.php b/generated/Normalizer/LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer.php index c752788..e3184b2 100644 --- a/generated/Normalizer/LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer.php +++ b/generated/Normalizer/LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,173 +20,85 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('user_source_id', $data)) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('password_field_id', $data) && null !== $data['password_field_id']) { - $object->setPasswordFieldId($data['password_field_id']); - unset($data['password_field_id']); - } elseif (\array_key_exists('password_field_id', $data) && null === $data['password_field_id']) { - $object->setPasswordFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('passwordFieldId') && null !== $object->getPasswordFieldId()) { - $data['password_field_id'] = $object->getPasswordFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('user_source_id', $data)) { + $object->setUserSourceId($data['user_source_id']); + unset($data['user_source_id']); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + unset($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('password_field_id', $data) && null !== $data['password_field_id']) { + $object->setPasswordFieldId($data['password_field_id']); + unset($data['password_field_id']); + } elseif (\array_key_exists('password_field_id', $data) && null === $data['password_field_id']) { + $object->setPasswordFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => false]; - } + return $object; } -} else { - class LocalBaserowPasswordAppAuthProviderBaseAppAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('domain') && null !== $data->getDomain()) { + $dataArray['domain'] = $data->getDomain(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class === get_class($data); + if ($data->isInitialized('passwordFieldId') && null !== $data->getPasswordFieldId()) { + $dataArray['password_field_id'] = $data->getPasswordFieldId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('user_source_id', $data)) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('password_field_id', $data) && null !== $data['password_field_id']) { - $object->setPasswordFieldId($data['password_field_id']); - unset($data['password_field_id']); - } elseif (\array_key_exists('password_field_id', $data) && null === $data['password_field_id']) { - $object->setPasswordFieldId(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('passwordFieldId') && null !== $object->getPasswordFieldId()) { - $data['password_field_id'] = $object->getPasswordFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowPasswordAppAuthProviderBaseAppAuthProvider::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowTableServiceFieldMappingNormalizer.php b/generated/Normalizer/LocalBaserowTableServiceFieldMappingNormalizer.php index 1c7f877..f1b9b76 100644 --- a/generated/Normalizer/LocalBaserowTableServiceFieldMappingNormalizer.php +++ b/generated/Normalizer/LocalBaserowTableServiceFieldMappingNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowTableServiceFieldMappingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowTableServiceFieldMappingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data)) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field_id'] = $object->getFieldId(); - $data['value'] = $object->getValue(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('field_id', $data)) { + $object->setFieldId($data['field_id']); + unset($data['field_id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => false]; + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); } - } -} else { - class LocalBaserowTableServiceFieldMappingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data)) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field_id'] = $data->getFieldId(); + $dataArray['value'] = $data->getValue(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field_id'] = $object->getFieldId(); - $data['value'] = $object->getValue(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowTableServiceFilterNormalizer.php b/generated/Normalizer/LocalBaserowTableServiceFilterNormalizer.php index 82e5585..cd3704d 100644 --- a/generated/Normalizer/LocalBaserowTableServiceFilterNormalizer.php +++ b/generated/Normalizer/LocalBaserowTableServiceFilterNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,179 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowTableServiceFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowTableServiceFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('value_is_formula', $data)) { - $object->setValueIsFormula($data['value_is_formula']); - unset($data['value_is_formula']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter(); + if (\array_key_exists('value_is_formula', $data) && \is_int($data['value_is_formula'])) { + $data['value_is_formula'] = (bool) $data['value_is_formula']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - $data['value'] = $object->getValue(); - if ($object->isInitialized('valueIsFormula') && null !== $object->getValueIsFormula()) { - $data['value_is_formula'] = $object->getValueIsFormula(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class LocalBaserowTableServiceFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class === $type; + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('value_is_formula', $data)) { - $object->setValueIsFormula($data['value_is_formula']); - unset($data['value_is_formula']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('value_is_formula', $data)) { + $object->setValueIsFormula($data['value_is_formula']); + unset($data['value_is_formula']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - $data['value'] = $object->getValue(); - if ($object->isInitialized('valueIsFormula') && null !== $object->getValueIsFormula()) { - $data['value_is_formula'] = $object->getValueIsFormula(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field'] = $data->getField(); + $dataArray['type'] = $data->getType(); + $dataArray['value'] = $data->getValue(); + if ($data->isInitialized('valueIsFormula') && null !== $data->getValueIsFormula()) { + $dataArray['value_is_formula'] = $data->getValueIsFormula(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFilter::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowTableServiceSortNormalizer.php b/generated/Normalizer/LocalBaserowTableServiceSortNormalizer.php index 9b3e6a5..1b03cf8 100644 --- a/generated/Normalizer/LocalBaserowTableServiceSortNormalizer.php +++ b/generated/Normalizer/LocalBaserowTableServiceSortNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,159 +20,78 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowTableServiceSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowTableServiceSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('order_by', $data)) { - $object->setOrderBy($data['order_by']); - unset($data['order_by']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field'] = $object->getField(); - if ($object->isInitialized('orderBy') && null !== $object->getOrderBy()) { - $data['order_by'] = $object->getOrderBy(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => false]; + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); } - } -} else { - class LocalBaserowTableServiceSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class === $type; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class === get_class($data); + if (\array_key_exists('order_by', $data)) { + $object->setOrderBy($data['order_by']); + unset($data['order_by']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort(); - if (null === $data || false === \is_array($data)) { - return $object; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('order_by', $data)) { - $object->setOrderBy($data['order_by']); - unset($data['order_by']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field'] = $object->getField(); - if ($object->isInitialized('orderBy') && null !== $object->getOrderBy()) { - $data['order_by'] = $object->getOrderBy(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field'] = $data->getField(); + if ($data->isInitialized('orderBy') && null !== $data->getOrderBy()) { + $dataArray['order_by'] = $data->getOrderBy(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceSort::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer.php b/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer.php index d40d438..9b270d1 100644 --- a/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,177 +20,87 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - $data['service'] = $object->getService(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class LocalBaserowUpdateRowWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class === $type; + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('service', $data)) { + $object->setService($data['service']); + unset($data['service']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - $data['service'] = $object->getService(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['order'] = $data->getOrder(); + $dataArray['event'] = $data->getEvent(); + $dataArray['service'] = $data->getService(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer.php b/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer.php index debe849..97fe517 100644 --- a/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,179 +20,88 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('service') && null !== $object->getService()) { - $data['service'] = $object->getService(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('service', $data)) { + $object->setService($data['service']); + unset($data['service']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + return $object; } -} else { - class LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('elementId') && null !== $data->getElementId()) { + $dataArray['element_id'] = $data->getElementId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + $dataArray['type'] = $data->getType(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('service') && null !== $data->getService()) { + $dataArray['service'] = $data->getService(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('service') && null !== $object->getService()) { - $data['service'] = $object->getService(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionCreateBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php b/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php index e412529..c46c8e4 100644 --- a/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('service') && null !== $object->getService()) { - $data['service'] = $object->getService(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('service', $data)) { + $object->setService($data['service']); + unset($data['service']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + return $object; } -} else { - class LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + if ($data->isInitialized('service') && null !== $data->getService()) { + $dataArray['service'] = $data->getService(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('service', $data)) { - $object->setService($data['service']); - unset($data['service']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('service') && null !== $object->getService()) { - $data['service'] = $object->getService(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpdateRowWorkflowActionUpdateBuilderWorkflowActions::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpsertRowCreateDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowUpsertRowCreateDataSourceNormalizer.php index 7866912..926ccaa 100644 --- a/generated/Normalizer/LocalBaserowUpsertRowCreateDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpsertRowCreateDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,263 +20,130 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpsertRowCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpsertRowCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - unset($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { - $object->setPageId(null); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('field_mappings', $data)) { - $values = []; - foreach ($data['field_mappings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values); - unset($data['field_mappings']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('pageId') && null !== $object->getPageId()) { - $data['page_id'] = $object->getPageId(); - } - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); - } - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('name', $data) && null !== $data['name']) { + $object->setName($data['name']); + unset($data['name']); + } elseif (\array_key_exists('name', $data) && null === $data['name']) { + $object->setName(null); + } + if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { + $object->setPageId(null); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('field_mappings', $data)) { + $values = []; + foreach ($data['field_mappings'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFieldMappings($values); + unset($data['field_mappings']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowUpsertRowCreateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class === get_class($data); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data) && null !== $data['name']) { - $object->setName($data['name']); - unset($data['name']); - } elseif (\array_key_exists('name', $data) && null === $data['name']) { - $object->setName(null); - } - if (\array_key_exists('page_id', $data) && null !== $data['page_id']) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } elseif (\array_key_exists('page_id', $data) && null === $data['page_id']) { - $object->setPageId(null); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('field_mappings', $data)) { - $values = []; - foreach ($data['field_mappings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values); - unset($data['field_mappings']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('pageId') && null !== $data->getPageId()) { + $dataArray['page_id'] = $data->getPageId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('pageId') && null !== $object->getPageId()) { - $data['page_id'] = $object->getPageId(); - } - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); - } - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); + } + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); + } + if ($data->isInitialized('rowId') && null !== $data->getRowId()) { + $dataArray['row_id'] = $data->getRowId(); + } + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); + } + if ($data->isInitialized('fieldMappings') && null !== $data->getFieldMappings()) { + $values = []; + foreach ($data->getFieldMappings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['field_mappings'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowCreateDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpsertRowDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowUpsertRowDataSourceNormalizer.php index 1fcf450..60d05e5 100644 --- a/generated/Normalizer/LocalBaserowUpsertRowDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpsertRowDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,293 +20,145 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpsertRowDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpsertRowDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('field_mappings', $data)) { - $values_3 = []; - foreach ($data['field_mappings'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values_3); - unset($data['field_mappings']); - } - foreach ($data as $key_3 => $value_4) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_4; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource(); + if (\array_key_exists('order', $data) && \is_int($data['order'])) { + $data['order'] = (float) $data['order']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('schema', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['schema'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); + $object->setSchema($values); + unset($data['schema']); + } + if (\array_key_exists('context_data', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); + $object->setContextData($values_1); + unset($data['context_data']); + } + if (\array_key_exists('context_data_schema', $data)) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data_schema'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + $object->setContextDataSchema($values_2); + unset($data['context_data_schema']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('field_mappings', $data)) { + $values_3 = []; + foreach ($data['field_mappings'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFieldMappings($values_3); + unset($data['field_mappings']); + } + foreach ($data as $key_3 => $value_4) { + if (preg_match('/.*/', (string) $key_3)) { + $object[$key_3] = $value_4; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowUpsertRowDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class === get_class($data); + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('field_mappings', $data)) { - $values_3 = []; - foreach ($data['field_mappings'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values_3); - unset($data['field_mappings']); - } - foreach ($data as $key_3 => $value_4) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_4; - } - } - - return $object; + if ($data->isInitialized('rowId') && null !== $data->getRowId()) { + $dataArray['row_id'] = $data->getRowId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); + if ($data->isInitialized('fieldMappings') && null !== $data->getFieldMappings()) { + $values = []; + foreach ($data->getFieldMappings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); - } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['field_mappings'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpsertRowNormalizer.php b/generated/Normalizer/LocalBaserowUpsertRowNormalizer.php index f30c7f4..f1188a3 100644 --- a/generated/Normalizer/LocalBaserowUpsertRowNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpsertRowNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,199 +20,98 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpsertRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpsertRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('field_mappings', $data)) { - $values = []; - foreach ($data['field_mappings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values); - unset($data['field_mappings']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); - } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('field_mappings', $data)) { + $values = []; + foreach ($data['field_mappings'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFieldMappings($values); + unset($data['field_mappings']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => false]; - } + return $object; } -} else { - class LocalBaserowUpsertRowNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class === get_class($data); + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('field_mappings', $data)) { - $values = []; - foreach ($data['field_mappings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values); - unset($data['field_mappings']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('rowId') && null !== $data->getRowId()) { + $dataArray['row_id'] = $data->getRowId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); - } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + if ($data->isInitialized('fieldMappings') && null !== $data->getFieldMappings()) { + $values = []; + foreach ($data->getFieldMappings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['field_mappings'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRow::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpsertRowPublicDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowUpsertRowPublicDataSourceNormalizer.php index eefd9de..0b73f1e 100644 --- a/generated/Normalizer/LocalBaserowUpsertRowPublicDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpsertRowPublicDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,261 +20,129 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpsertRowPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpsertRowPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('context_data', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key => $value) { - $values[$key] = $value; - } - $object->setContextData($values); - unset($data['context_data']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('field_mappings', $data)) { - $values_1 = []; - foreach ($data['field_mappings'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values_1); - unset($data['field_mappings']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource(); + if (\array_key_exists('order', $data) && \is_int($data['order'])) { + $data['order'] = (float) $data['order']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); - } - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('context_data', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + $object->setContextData($values); + unset($data['context_data']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('field_mappings', $data)) { + $values_1 = []; + foreach ($data['field_mappings'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFieldMappings($values_1); + unset($data['field_mappings']); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowUpsertRowPublicDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class === get_class($data); + if ($data->isInitialized('rowId') && null !== $data->getRowId()) { + $dataArray['row_id'] = $data->getRowId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource(); - if (\array_key_exists('order', $data) && \is_int($data['order'])) { - $data['order'] = (float) $data['order']; - } - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('context_data', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key => $value) { - $values[$key] = $value; - } - $object->setContextData($values); - unset($data['context_data']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('field_mappings', $data)) { - $values_1 = []; - foreach ($data['field_mappings'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values_1); - unset($data['field_mappings']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - - return $object; + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); + if ($data->isInitialized('fieldMappings') && null !== $data->getFieldMappings()) { + $values = []; + foreach ($data->getFieldMappings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['field_mappings'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowPublicDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpsertRowServiceNormalizer.php b/generated/Normalizer/LocalBaserowUpsertRowServiceNormalizer.php index 9de9ae3..bfd07ca 100644 --- a/generated/Normalizer/LocalBaserowUpsertRowServiceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpsertRowServiceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,263 +20,130 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpsertRowServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpsertRowServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('field_mappings', $data)) { - $values_3 = []; - foreach ($data['field_mappings'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values_3); - unset($data['field_mappings']); - } - foreach ($data as $key_3 => $value_4) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_4; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('schema', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['schema'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); + $object->setSchema($values); + unset($data['schema']); + } + if (\array_key_exists('context_data', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); + $object->setContextData($values_1); + unset($data['context_data']); + } + if (\array_key_exists('context_data_schema', $data)) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['context_data_schema'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + $object->setContextDataSchema($values_2); + unset($data['context_data_schema']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('field_mappings', $data)) { + $values_3 = []; + foreach ($data['field_mappings'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFieldMappings($values_3); + unset($data['field_mappings']); + } + foreach ($data as $key_3 => $value_4) { + if (preg_match('/.*/', (string) $key_3)) { + $object[$key_3] = $value_4; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => false]; - } + return $object; } -} else { - class LocalBaserowUpsertRowServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class === get_class($data); + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('schema', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['schema'] as $key => $value) { - $values[$key] = $value; - } - $object->setSchema($values); - unset($data['schema']); - } - if (\array_key_exists('context_data', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setContextData($values_1); - unset($data['context_data']); - } - if (\array_key_exists('context_data_schema', $data)) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['context_data_schema'] as $key_2 => $value_2) { - $values_2[$key_2] = $value_2; - } - $object->setContextDataSchema($values_2); - unset($data['context_data_schema']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('field_mappings', $data)) { - $values_3 = []; - foreach ($data['field_mappings'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values_3); - unset($data['field_mappings']); - } - foreach ($data as $key_3 => $value_4) { - if (preg_match('/.*/', (string) $key_3)) { - $object[$key_3] = $value_4; - } - } - - return $object; + if ($data->isInitialized('rowId') && null !== $data->getRowId()) { + $dataArray['row_id'] = $data->getRowId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); + if ($data->isInitialized('fieldMappings') && null !== $data->getFieldMappings()) { + $values = []; + foreach ($data->getFieldMappings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['field_mappings'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowService::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUpsertRowUpdateDataSourceNormalizer.php b/generated/Normalizer/LocalBaserowUpsertRowUpdateDataSourceNormalizer.php index f1f73cd..d5548a8 100644 --- a/generated/Normalizer/LocalBaserowUpsertRowUpdateDataSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUpsertRowUpdateDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,213 +20,105 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUpsertRowUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUpsertRowUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('field_mappings', $data)) { - $values = []; - foreach ($data['field_mappings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values); - unset($data['field_mappings']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); - } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('field_mappings', $data)) { + $values = []; + foreach ($data['field_mappings'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFieldMappings($values); + unset($data['field_mappings']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => false]; - } + return $object; } -} else { - class LocalBaserowUpsertRowUpdateDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class === get_class($data); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('field_mappings', $data)) { - $values = []; - foreach ($data['field_mappings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowTableServiceFieldMapping::class, 'json', $context); - } - $object->setFieldMappings($values); - unset($data['field_mappings']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('rowId') && null !== $object->getRowId()) { - $data['row_id'] = $object->getRowId(); - } - if ($object->isInitialized('fieldMappings') && null !== $object->getFieldMappings()) { - $values = []; - foreach ($object->getFieldMappings() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_mappings'] = $values; + if ($data->isInitialized('rowId') && null !== $data->getRowId()) { + $dataArray['row_id'] = $data->getRowId(); + } + if ($data->isInitialized('fieldMappings') && null !== $data->getFieldMappings()) { + $values = []; + foreach ($data->getFieldMappings() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['field_mappings'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUpsertRowUpdateDataSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUserSourceBasePublicUserSourceNormalizer.php b/generated/Normalizer/LocalBaserowUserSourceBasePublicUserSourceNormalizer.php index 4a7158d..f0ec24e 100644 --- a/generated/Normalizer/LocalBaserowUserSourceBasePublicUserSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUserSourceBasePublicUserSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,253 +20,125 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUserSourceBasePublicUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUserSourceBasePublicUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('auth_providers', $data)) { - $values = []; - foreach ($data['auth_providers'] as $value) { - $values[] = $value; - } - $object->setAuthProviders($values); - unset($data['auth_providers']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('authProviders') && null !== $object->getAuthProviders()) { - $values = []; - foreach ($object->getAuthProviders() as $value) { - $values[] = $value; - } - $data['auth_providers'] = $values; - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class LocalBaserowUserSourceBasePublicUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); + if (\array_key_exists('auth_providers', $data)) { + $values = []; + foreach ($data['auth_providers'] as $value) { + $values[] = $value; } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('auth_providers', $data)) { - $values = []; - foreach ($data['auth_providers'] as $value) { - $values[] = $value; - } - $object->setAuthProviders($values); - unset($data['auth_providers']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $object->setAuthProviders($values); + unset($data['auth_providers']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { + $object->setEmailFieldId($data['email_field_id']); + unset($data['email_field_id']); + } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { + $object->setEmailFieldId(null); + } + if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { + $object->setNameFieldId($data['name_field_id']); + unset($data['name_field_id']); + } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { + $object->setNameFieldId(null); + } + if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { + $object->setRoleFieldId($data['role_field_id']); + unset($data['role_field_id']); + } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { + $object->setRoleFieldId(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('authProviders') && null !== $object->getAuthProviders()) { - $values = []; - foreach ($object->getAuthProviders() as $value) { - $values[] = $value; - } - $data['auth_providers'] = $values; - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('authProviders') && null !== $data->getAuthProviders()) { + $values = []; + foreach ($data->getAuthProviders() as $value) { + $values[] = $value; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['auth_providers'] = $values; + } + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); + } + if ($data->isInitialized('emailFieldId') && null !== $data->getEmailFieldId()) { + $dataArray['email_field_id'] = $data->getEmailFieldId(); + } + if ($data->isInitialized('nameFieldId') && null !== $data->getNameFieldId()) { + $dataArray['name_field_id'] = $data->getNameFieldId(); + } + if ($data->isInitialized('roleFieldId') && null !== $data->getRoleFieldId()) { + $dataArray['role_field_id'] = $data->getRoleFieldId(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceBasePublicUserSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUserSourceCreateUserSourceNormalizer.php b/generated/Normalizer/LocalBaserowUserSourceCreateUserSourceNormalizer.php index e0a0c70..ee6dc6d 100644 --- a/generated/Normalizer/LocalBaserowUserSourceCreateUserSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUserSourceCreateUserSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,265 +20,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUserSourceCreateUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUserSourceCreateUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('integration_id', $data)) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } - if (\array_key_exists('auth_providers', $data)) { - $values = []; - foreach ($data['auth_providers'] as $value) { - $values[] = $value; - } - $object->setAuthProviders($values); - unset($data['auth_providers']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - $data['name'] = $object->getName(); - $data['integration_id'] = $object->getIntegrationId(); - if ($object->isInitialized('authProviders') && null !== $object->getAuthProviders()) { - $values = []; - foreach ($object->getAuthProviders() as $value) { - $values[] = $value; - } - $data['auth_providers'] = $values; - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('integration_id', $data)) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } + if (\array_key_exists('auth_providers', $data)) { + $values = []; + foreach ($data['auth_providers'] as $value) { + $values[] = $value; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setAuthProviders($values); + unset($data['auth_providers']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { + $object->setEmailFieldId($data['email_field_id']); + unset($data['email_field_id']); + } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { + $object->setEmailFieldId(null); + } + if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { + $object->setNameFieldId($data['name_field_id']); + unset($data['name_field_id']); + } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { + $object->setNameFieldId(null); + } + if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { + $object->setRoleFieldId($data['role_field_id']); + unset($data['role_field_id']); + } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { + $object->setRoleFieldId(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => false]; - } + return $object; } -} else { - class LocalBaserowUserSourceCreateUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class === get_class($data); + $dataArray['type'] = $data->getType(); + $dataArray['name'] = $data->getName(); + $dataArray['integration_id'] = $data->getIntegrationId(); + if ($data->isInitialized('authProviders') && null !== $data->getAuthProviders()) { + $values = []; + foreach ($data->getAuthProviders() as $value) { + $values[] = $value; + } + $dataArray['auth_providers'] = $values; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('integration_id', $data)) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } - if (\array_key_exists('auth_providers', $data)) { - $values = []; - foreach ($data['auth_providers'] as $value) { - $values[] = $value; - } - $object->setAuthProviders($values); - unset($data['auth_providers']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - $data['name'] = $object->getName(); - $data['integration_id'] = $object->getIntegrationId(); - if ($object->isInitialized('authProviders') && null !== $object->getAuthProviders()) { - $values = []; - foreach ($object->getAuthProviders() as $value) { - $values[] = $value; - } - $data['auth_providers'] = $values; - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if ($data->isInitialized('emailFieldId') && null !== $data->getEmailFieldId()) { + $dataArray['email_field_id'] = $data->getEmailFieldId(); + } + if ($data->isInitialized('nameFieldId') && null !== $data->getNameFieldId()) { + $dataArray['name_field_id'] = $data->getNameFieldId(); + } + if ($data->isInitialized('roleFieldId') && null !== $data->getRoleFieldId()) { + $dataArray['role_field_id'] = $data->getRoleFieldId(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceCreateUserSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUserSourceUpdateUserSourceNormalizer.php b/generated/Normalizer/LocalBaserowUserSourceUpdateUserSourceNormalizer.php index b6439cb..2c93b32 100644 --- a/generated/Normalizer/LocalBaserowUserSourceUpdateUserSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUserSourceUpdateUserSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,249 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUserSourceUpdateUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUserSourceUpdateUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('integration_id', $data)) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } - if (\array_key_exists('auth_providers', $data)) { - $values = []; - foreach ($data['auth_providers'] as $value) { - $values[] = $value; - } - $object->setAuthProviders($values); - unset($data['auth_providers']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('authProviders') && null !== $object->getAuthProviders()) { - $values = []; - foreach ($object->getAuthProviders() as $value) { - $values[] = $value; - } - $data['auth_providers'] = $values; - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('integration_id', $data)) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } + if (\array_key_exists('auth_providers', $data)) { + $values = []; + foreach ($data['auth_providers'] as $value) { + $values[] = $value; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setAuthProviders($values); + unset($data['auth_providers']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { + $object->setEmailFieldId($data['email_field_id']); + unset($data['email_field_id']); + } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { + $object->setEmailFieldId(null); + } + if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { + $object->setNameFieldId($data['name_field_id']); + unset($data['name_field_id']); + } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { + $object->setNameFieldId(null); + } + if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { + $object->setRoleFieldId($data['role_field_id']); + unset($data['role_field_id']); + } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { + $object->setRoleFieldId(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => false]; - } + return $object; } -} else { - class LocalBaserowUserSourceUpdateUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class === get_class($data); + if ($data->isInitialized('integrationId') && null !== $data->getIntegrationId()) { + $dataArray['integration_id'] = $data->getIntegrationId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('integration_id', $data)) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); + if ($data->isInitialized('authProviders') && null !== $data->getAuthProviders()) { + $values = []; + foreach ($data->getAuthProviders() as $value) { + $values[] = $value; } - if (\array_key_exists('auth_providers', $data)) { - $values = []; - foreach ($data['auth_providers'] as $value) { - $values[] = $value; - } - $object->setAuthProviders($values); - unset($data['auth_providers']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + $dataArray['auth_providers'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('integrationId') && null !== $object->getIntegrationId()) { - $data['integration_id'] = $object->getIntegrationId(); - } - if ($object->isInitialized('authProviders') && null !== $object->getAuthProviders()) { - $values = []; - foreach ($object->getAuthProviders() as $value) { - $values[] = $value; - } - $data['auth_providers'] = $values; - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); + } + if ($data->isInitialized('emailFieldId') && null !== $data->getEmailFieldId()) { + $dataArray['email_field_id'] = $data->getEmailFieldId(); + } + if ($data->isInitialized('nameFieldId') && null !== $data->getNameFieldId()) { + $dataArray['name_field_id'] = $data->getNameFieldId(); + } + if ($data->isInitialized('roleFieldId') && null !== $data->getRoleFieldId()) { + $dataArray['role_field_id'] = $data->getRoleFieldId(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUpdateUserSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUserSourceUserSourceNormalizer.php b/generated/Normalizer/LocalBaserowUserSourceUserSourceNormalizer.php index dafbc61..dd7664c 100644 --- a/generated/Normalizer/LocalBaserowUserSourceUserSourceNormalizer.php +++ b/generated/Normalizer/LocalBaserowUserSourceUserSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,273 +20,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUserSourceUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUserSourceUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('application_id', $data)) { - $object->setApplicationId($data['application_id']); - unset($data['application_id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('auth_providers', $data)) { - $values = []; - foreach ($data['auth_providers'] as $value) { - $values[] = $value; - } - $object->setAuthProviders($values); - unset($data['auth_providers']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('authProviders') && null !== $object->getAuthProviders()) { - $values = []; - foreach ($object->getAuthProviders() as $value) { - $values[] = $value; - } - $data['auth_providers'] = $values; - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => false]; + if (\array_key_exists('application_id', $data)) { + $object->setApplicationId($data['application_id']); + unset($data['application_id']); } - } -} else { - class LocalBaserowUserSourceUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class === $type; + if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { + $object->setIntegrationId($data['integration_id']); + unset($data['integration_id']); + } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { + $object->setIntegrationId(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('application_id', $data)) { - $object->setApplicationId($data['application_id']); - unset($data['application_id']); - } - if (\array_key_exists('integration_id', $data) && null !== $data['integration_id']) { - $object->setIntegrationId($data['integration_id']); - unset($data['integration_id']); - } elseif (\array_key_exists('integration_id', $data) && null === $data['integration_id']) { - $object->setIntegrationId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('auth_providers', $data)) { - $values = []; - foreach ($data['auth_providers'] as $value) { - $values[] = $value; - } - $object->setAuthProviders($values); - unset($data['auth_providers']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('auth_providers', $data)) { + $values = []; + foreach ($data['auth_providers'] as $value) { + $values[] = $value; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $object->setAuthProviders($values); + unset($data['auth_providers']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { + $object->setEmailFieldId($data['email_field_id']); + unset($data['email_field_id']); + } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { + $object->setEmailFieldId(null); + } + if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { + $object->setNameFieldId($data['name_field_id']); + unset($data['name_field_id']); + } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { + $object->setNameFieldId(null); + } + if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { + $object->setRoleFieldId($data['role_field_id']); + unset($data['role_field_id']); + } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { + $object->setRoleFieldId(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('authProviders') && null !== $object->getAuthProviders()) { - $values = []; - foreach ($object->getAuthProviders() as $value) { - $values[] = $value; - } - $data['auth_providers'] = $values; - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('authProviders') && null !== $data->getAuthProviders()) { + $values = []; + foreach ($data->getAuthProviders() as $value) { + $values[] = $value; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['auth_providers'] = $values; + } + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); + } + if ($data->isInitialized('emailFieldId') && null !== $data->getEmailFieldId()) { + $dataArray['email_field_id'] = $data->getEmailFieldId(); + } + if ($data->isInitialized('nameFieldId') && null !== $data->getNameFieldId()) { + $dataArray['name_field_id'] = $data->getNameFieldId(); + } + if ($data->isInitialized('roleFieldId') && null !== $data->getRoleFieldId()) { + $dataArray['role_field_id'] = $data->getRoleFieldId(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSource::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowUserSourceUserSourceRolesNormalizer.php b/generated/Normalizer/LocalBaserowUserSourceUserSourceRolesNormalizer.php index 08260ba..4a1bea4 100644 --- a/generated/Normalizer/LocalBaserowUserSourceUserSourceRolesNormalizer.php +++ b/generated/Normalizer/LocalBaserowUserSourceUserSourceRolesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,215 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowUserSourceUserSourceRolesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowUserSourceUserSourceRolesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('roles', $data)) { - $values = []; - foreach ($data['roles'] as $value) { - $values[] = $value; - } - $object->setRoles($values); - unset($data['roles']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('roles', $data)) { + $values = []; + foreach ($data['roles'] as $value) { + $values[] = $value; } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRoles($values); + unset($data['roles']); + } + if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { + $object->setTableId(null); + } + if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { + $object->setEmailFieldId($data['email_field_id']); + unset($data['email_field_id']); + } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { + $object->setEmailFieldId(null); + } + if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { + $object->setNameFieldId($data['name_field_id']); + unset($data['name_field_id']); + } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { + $object->setNameFieldId(null); + } + if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { + $object->setRoleFieldId($data['role_field_id']); + unset($data['role_field_id']); + } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { + $object->setRoleFieldId(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => false]; - } + return $object; } -} else { - class LocalBaserowUserSourceUserSourceRolesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class === get_class($data); + if ($data->isInitialized('emailFieldId') && null !== $data->getEmailFieldId()) { + $dataArray['email_field_id'] = $data->getEmailFieldId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('roles', $data)) { - $values = []; - foreach ($data['roles'] as $value) { - $values[] = $value; - } - $object->setRoles($values); - unset($data['roles']); - } - if (\array_key_exists('table_id', $data) && null !== $data['table_id']) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } elseif (\array_key_exists('table_id', $data) && null === $data['table_id']) { - $object->setTableId(null); - } - if (\array_key_exists('email_field_id', $data) && null !== $data['email_field_id']) { - $object->setEmailFieldId($data['email_field_id']); - unset($data['email_field_id']); - } elseif (\array_key_exists('email_field_id', $data) && null === $data['email_field_id']) { - $object->setEmailFieldId(null); - } - if (\array_key_exists('name_field_id', $data) && null !== $data['name_field_id']) { - $object->setNameFieldId($data['name_field_id']); - unset($data['name_field_id']); - } elseif (\array_key_exists('name_field_id', $data) && null === $data['name_field_id']) { - $object->setNameFieldId(null); - } - if (\array_key_exists('role_field_id', $data) && null !== $data['role_field_id']) { - $object->setRoleFieldId($data['role_field_id']); - unset($data['role_field_id']); - } elseif (\array_key_exists('role_field_id', $data) && null === $data['role_field_id']) { - $object->setRoleFieldId(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('nameFieldId') && null !== $data->getNameFieldId()) { + $dataArray['name_field_id'] = $data->getNameFieldId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('emailFieldId') && null !== $object->getEmailFieldId()) { - $data['email_field_id'] = $object->getEmailFieldId(); - } - if ($object->isInitialized('nameFieldId') && null !== $object->getNameFieldId()) { - $data['name_field_id'] = $object->getNameFieldId(); - } - if ($object->isInitialized('roleFieldId') && null !== $object->getRoleFieldId()) { - $data['role_field_id'] = $object->getRoleFieldId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('roleFieldId') && null !== $data->getRoleFieldId()) { + $dataArray['role_field_id'] = $data->getRoleFieldId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowUserSourceUserSourceRoles::class => false]; } } diff --git a/generated/Normalizer/LocalBaserowViewNormalizer.php b/generated/Normalizer/LocalBaserowViewNormalizer.php index a897388..1b64325 100644 --- a/generated/Normalizer/LocalBaserowViewNormalizer.php +++ b/generated/Normalizer/LocalBaserowViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LocalBaserowViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LocalBaserowViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowView(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class LocalBaserowViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class === $type; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LocalBaserowView::class === get_class($data); + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LocalBaserowView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LocalBaserowView::class => false]; } } diff --git a/generated/Normalizer/LogoutWorkflowActionBuilderWorkflowActionNormalizer.php b/generated/Normalizer/LogoutWorkflowActionBuilderWorkflowActionNormalizer.php index a92435f..ba11dad 100644 --- a/generated/Normalizer/LogoutWorkflowActionBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/LogoutWorkflowActionBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,167 +20,82 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LogoutWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LogoutWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class LogoutWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class === $type; + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['order'] = $data->getOrder(); + $dataArray['event'] = $data->getEvent(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer.php b/generated/Normalizer/LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer.php index a45d7b4..08a8389 100644 --- a/generated/Normalizer/LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => false]; + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); } - } -} else { - class LogoutWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class === $type; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('elementId') && null !== $data->getElementId()) { + $dataArray['element_id'] = $data->getElementId(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => false]; + $dataArray['type'] = $data->getType(); + $dataArray['event'] = $data->getEvent(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionCreateBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php b/generated/Normalizer/LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php index ac193fa..dccc4d5 100644 --- a/generated/Normalizer/LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php +++ b/generated/Normalizer/LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + return $object; } -} else { - class LogoutWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LogoutWorkflowActionUpdateBuilderWorkflowActions::class => false]; } } diff --git a/generated/Normalizer/LongTextFieldCreateFieldNormalizer.php b/generated/Normalizer/LongTextFieldCreateFieldNormalizer.php index b5eabf0..b81c159 100644 --- a/generated/Normalizer/LongTextFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/LongTextFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,89 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LongTextFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LongTextFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); - unset($data['long_text_enable_rich_text']); - } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField(); + if (\array_key_exists('long_text_enable_rich_text', $data) && \is_int($data['long_text_enable_rich_text'])) { + $data['long_text_enable_rich_text'] = (bool) $data['long_text_enable_rich_text']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('longTextEnableRichText') && null !== $object->getLongTextEnableRichText()) { - $data['long_text_enable_rich_text'] = $object->getLongTextEnableRichText(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { + $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); + unset($data['long_text_enable_rich_text']); + } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { + $object->setLongTextEnableRichText(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => false]; - } + return $object; } -} else { - class LongTextFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class === get_class($data); + if ($data->isInitialized('longTextEnableRichText') && null !== $data->getLongTextEnableRichText()) { + $dataArray['long_text_enable_rich_text'] = $data->getLongTextEnableRichText(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); - unset($data['long_text_enable_rich_text']); - } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('longTextEnableRichText') && null !== $object->getLongTextEnableRichText()) { - $data['long_text_enable_rich_text'] = $object->getLongTextEnableRichText(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LongTextFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/LongTextFieldFieldNormalizer.php b/generated/Normalizer/LongTextFieldFieldNormalizer.php index 4ad01bb..a99429c 100644 --- a/generated/Normalizer/LongTextFieldFieldNormalizer.php +++ b/generated/Normalizer/LongTextFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,221 +20,118 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LongTextFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LongTextFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); - unset($data['long_text_enable_rich_text']); - } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('long_text_enable_rich_text', $data) && \is_int($data['long_text_enable_rich_text'])) { + $data['long_text_enable_rich_text'] = (bool) $data['long_text_enable_rich_text']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('longTextEnableRichText') && null !== $object->getLongTextEnableRichText()) { - $data['long_text_enable_rich_text'] = $object->getLongTextEnableRichText(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { + $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); + unset($data['long_text_enable_rich_text']); + } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { + $object->setLongTextEnableRichText(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => false]; - } + return $object; } -} else { - class LongTextFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); - unset($data['long_text_enable_rich_text']); - } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('longTextEnableRichText') && null !== $data->getLongTextEnableRichText()) { + $dataArray['long_text_enable_rich_text'] = $data->getLongTextEnableRichText(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('longTextEnableRichText') && null !== $object->getLongTextEnableRichText()) { - $data['long_text_enable_rich_text'] = $object->getLongTextEnableRichText(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LongTextFieldField::class => false]; } } diff --git a/generated/Normalizer/LongTextFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/LongTextFieldFieldSerializerWithRelatedFieldsNormalizer.php index cf1a7d6..0480cff 100644 --- a/generated/Normalizer/LongTextFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/LongTextFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,237 +20,126 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LongTextFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LongTextFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); - unset($data['long_text_enable_rich_text']); - } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('long_text_enable_rich_text', $data) && \is_int($data['long_text_enable_rich_text'])) { + $data['long_text_enable_rich_text'] = (bool) $data['long_text_enable_rich_text']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('longTextEnableRichText') && null !== $object->getLongTextEnableRichText()) { - $data['long_text_enable_rich_text'] = $object->getLongTextEnableRichText(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { + $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); + unset($data['long_text_enable_rich_text']); + } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { + $object->setLongTextEnableRichText(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class LongTextFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); - unset($data['long_text_enable_rich_text']); - } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('longTextEnableRichText') && null !== $data->getLongTextEnableRichText()) { + $dataArray['long_text_enable_rich_text'] = $data->getLongTextEnableRichText(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('longTextEnableRichText') && null !== $object->getLongTextEnableRichText()) { - $data['long_text_enable_rich_text'] = $object->getLongTextEnableRichText(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LongTextFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/LongTextFieldUpdateFieldNormalizer.php b/generated/Normalizer/LongTextFieldUpdateFieldNormalizer.php index 112c46a..ad8b7e2 100644 --- a/generated/Normalizer/LongTextFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/LongTextFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LongTextFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LongTextFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); - unset($data['long_text_enable_rich_text']); - } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField(); + if (\array_key_exists('long_text_enable_rich_text', $data) && \is_int($data['long_text_enable_rich_text'])) { + $data['long_text_enable_rich_text'] = (bool) $data['long_text_enable_rich_text']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('longTextEnableRichText') && null !== $object->getLongTextEnableRichText()) { - $data['long_text_enable_rich_text'] = $object->getLongTextEnableRichText(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { + $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); + unset($data['long_text_enable_rich_text']); + } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { + $object->setLongTextEnableRichText(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => false]; - } + return $object; } -} else { - class LongTextFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('long_text_enable_rich_text', $data) && null !== $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText($data['long_text_enable_rich_text']); - unset($data['long_text_enable_rich_text']); - } elseif (\array_key_exists('long_text_enable_rich_text', $data) && null === $data['long_text_enable_rich_text']) { - $object->setLongTextEnableRichText(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('longTextEnableRichText') && null !== $object->getLongTextEnableRichText()) { - $data['long_text_enable_rich_text'] = $object->getLongTextEnableRichText(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('longTextEnableRichText') && null !== $data->getLongTextEnableRichText()) { + $dataArray['long_text_enable_rich_text'] = $data->getLongTextEnableRichText(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LongTextFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/LookupFieldCreateFieldNormalizer.php b/generated/Normalizer/LookupFieldCreateFieldNormalizer.php index 0ee1baf..1a3b3bb 100644 --- a/generated/Normalizer/LookupFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/LookupFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,413 +20,214 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LookupFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LookupFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { - $object->setThroughFieldName($data['through_field_name']); - unset($data['through_field_name']); - } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { - $object->setThroughFieldName(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { - $object->setTargetFieldName($data['target_field_name']); - unset($data['target_field_name']); - } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { - $object->setTargetFieldName(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('throughFieldName') && null !== $object->getThroughFieldName()) { - $data['through_field_name'] = $object->getThroughFieldName(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('targetFieldName') && null !== $object->getTargetFieldName()) { - $data['target_field_name'] = $object->getTargetFieldName(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { + $object->setThroughFieldName($data['through_field_name']); + unset($data['through_field_name']); + } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { + $object->setThroughFieldName(null); + } + if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { + $object->setTargetFieldId($data['target_field_id']); + unset($data['target_field_id']); + } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { + $object->setTargetFieldId(null); + } + if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { + $object->setTargetFieldName($data['target_field_name']); + unset($data['target_field_name']); + } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { + $object->setTargetFieldName(null); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => false]; - } + return $object; } -} else { - class LookupFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class === get_class($data); + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { - $object->setThroughFieldName($data['through_field_name']); - unset($data['through_field_name']); - } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { - $object->setThroughFieldName(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { - $object->setTargetFieldName($data['target_field_name']); - unset($data['target_field_name']); - } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { - $object->setTargetFieldName(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('throughFieldName') && null !== $object->getThroughFieldName()) { - $data['through_field_name'] = $object->getThroughFieldName(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('targetFieldName') && null !== $object->getTargetFieldName()) { - $data['target_field_name'] = $object->getTargetFieldName(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('throughFieldName') && null !== $data->getThroughFieldName()) { + $dataArray['through_field_name'] = $data->getThroughFieldName(); + } + if ($data->isInitialized('targetFieldId') && null !== $data->getTargetFieldId()) { + $dataArray['target_field_id'] = $data->getTargetFieldId(); + } + if ($data->isInitialized('targetFieldName') && null !== $data->getTargetFieldName()) { + $dataArray['target_field_name'] = $data->getTargetFieldName(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LookupFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/LookupFieldFieldNormalizer.php b/generated/Normalizer/LookupFieldFieldNormalizer.php index 0522170..28b9e49 100644 --- a/generated/Normalizer/LookupFieldFieldNormalizer.php +++ b/generated/Normalizer/LookupFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,459 +20,243 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LookupFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LookupFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LookupFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LookupFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { - $object->setThroughFieldName($data['through_field_name']); - unset($data['through_field_name']); - } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { - $object->setThroughFieldName(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { - $object->setTargetFieldName($data['target_field_name']); - unset($data['target_field_name']); - } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { - $object->setTargetFieldName(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('throughFieldName') && null !== $object->getThroughFieldName()) { - $data['through_field_name'] = $object->getThroughFieldName(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('targetFieldName') && null !== $object->getTargetFieldName()) { - $data['target_field_name'] = $object->getTargetFieldName(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { + $object->setThroughFieldName($data['through_field_name']); + unset($data['through_field_name']); + } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { + $object->setThroughFieldName(null); + } + if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { + $object->setTargetFieldId($data['target_field_id']); + unset($data['target_field_id']); + } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { + $object->setTargetFieldId(null); + } + if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { + $object->setTargetFieldName($data['target_field_name']); + unset($data['target_field_name']); + } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { + $object->setTargetFieldName(null); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LookupFieldField::class => false]; - } + return $object; } -} else { - class LookupFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LookupFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { - $object->setThroughFieldName($data['through_field_name']); - unset($data['through_field_name']); - } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { - $object->setThroughFieldName(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { - $object->setTargetFieldName($data['target_field_name']); - unset($data['target_field_name']); - } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { - $object->setTargetFieldName(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('throughFieldName') && null !== $object->getThroughFieldName()) { - $data['through_field_name'] = $object->getThroughFieldName(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('targetFieldName') && null !== $object->getTargetFieldName()) { - $data['target_field_name'] = $object->getTargetFieldName(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('throughFieldName') && null !== $data->getThroughFieldName()) { + $dataArray['through_field_name'] = $data->getThroughFieldName(); + } + if ($data->isInitialized('targetFieldId') && null !== $data->getTargetFieldId()) { + $dataArray['target_field_id'] = $data->getTargetFieldId(); + } + if ($data->isInitialized('targetFieldName') && null !== $data->getTargetFieldName()) { + $dataArray['target_field_name'] = $data->getTargetFieldName(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LookupFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LookupFieldField::class => false]; } } diff --git a/generated/Normalizer/LookupFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/LookupFieldFieldSerializerWithRelatedFieldsNormalizer.php index 9bb419c..9def644 100644 --- a/generated/Normalizer/LookupFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/LookupFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,475 +20,251 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LookupFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LookupFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { - $object->setThroughFieldName($data['through_field_name']); - unset($data['through_field_name']); - } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { - $object->setThroughFieldName(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { - $object->setTargetFieldName($data['target_field_name']); - unset($data['target_field_name']); - } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { - $object->setTargetFieldName(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('throughFieldName') && null !== $object->getThroughFieldName()) { - $data['through_field_name'] = $object->getThroughFieldName(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('targetFieldName') && null !== $object->getTargetFieldName()) { - $data['target_field_name'] = $object->getTargetFieldName(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { + $object->setThroughFieldName($data['through_field_name']); + unset($data['through_field_name']); + } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { + $object->setThroughFieldName(null); + } + if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { + $object->setTargetFieldId($data['target_field_id']); + unset($data['target_field_id']); + } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { + $object->setTargetFieldId(null); + } + if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { + $object->setTargetFieldName($data['target_field_name']); + unset($data['target_field_name']); + } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { + $object->setTargetFieldName(null); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class LookupFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { - $object->setThroughFieldName($data['through_field_name']); - unset($data['through_field_name']); - } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { - $object->setThroughFieldName(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { - $object->setTargetFieldName($data['target_field_name']); - unset($data['target_field_name']); - } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { - $object->setTargetFieldName(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('throughFieldName') && null !== $object->getThroughFieldName()) { - $data['through_field_name'] = $object->getThroughFieldName(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('targetFieldName') && null !== $object->getTargetFieldName()) { - $data['target_field_name'] = $object->getTargetFieldName(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('throughFieldName') && null !== $data->getThroughFieldName()) { + $dataArray['through_field_name'] = $data->getThroughFieldName(); + } + if ($data->isInitialized('targetFieldId') && null !== $data->getTargetFieldId()) { + $dataArray['target_field_id'] = $data->getTargetFieldId(); + } + if ($data->isInitialized('targetFieldName') && null !== $data->getTargetFieldName()) { + $dataArray['target_field_name'] = $data->getTargetFieldName(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LookupFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/LookupFieldUpdateFieldNormalizer.php b/generated/Normalizer/LookupFieldUpdateFieldNormalizer.php index a4b6c76..716a595 100644 --- a/generated/Normalizer/LookupFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/LookupFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,421 +20,218 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class LookupFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class LookupFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { - $object->setThroughFieldName($data['through_field_name']); - unset($data['through_field_name']); - } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { - $object->setThroughFieldName(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { - $object->setTargetFieldName($data['target_field_name']); - unset($data['target_field_name']); - } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { - $object->setTargetFieldName(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('throughFieldName') && null !== $object->getThroughFieldName()) { - $data['through_field_name'] = $object->getThroughFieldName(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('targetFieldName') && null !== $object->getTargetFieldName()) { - $data['target_field_name'] = $object->getTargetFieldName(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { + $object->setThroughFieldName($data['through_field_name']); + unset($data['through_field_name']); + } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { + $object->setThroughFieldName(null); + } + if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { + $object->setTargetFieldId($data['target_field_id']); + unset($data['target_field_id']); + } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { + $object->setTargetFieldId(null); + } + if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { + $object->setTargetFieldName($data['target_field_name']); + unset($data['target_field_name']); + } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { + $object->setTargetFieldName(null); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => false]; - } + return $object; } -} else { - class LookupFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('through_field_name', $data) && null !== $data['through_field_name']) { - $object->setThroughFieldName($data['through_field_name']); - unset($data['through_field_name']); - } elseif (\array_key_exists('through_field_name', $data) && null === $data['through_field_name']) { - $object->setThroughFieldName(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('target_field_name', $data) && null !== $data['target_field_name']) { - $object->setTargetFieldName($data['target_field_name']); - unset($data['target_field_name']); - } elseif (\array_key_exists('target_field_name', $data) && null === $data['target_field_name']) { - $object->setTargetFieldName(null); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('throughFieldName') && null !== $object->getThroughFieldName()) { - $data['through_field_name'] = $object->getThroughFieldName(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('targetFieldName') && null !== $object->getTargetFieldName()) { - $data['target_field_name'] = $object->getTargetFieldName(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('throughFieldName') && null !== $data->getThroughFieldName()) { + $dataArray['through_field_name'] = $data->getThroughFieldName(); + } + if ($data->isInitialized('targetFieldId') && null !== $data->getTargetFieldId()) { + $dataArray['target_field_id'] = $data->getTargetFieldId(); + } + if ($data->isInitialized('targetFieldName') && null !== $data->getTargetFieldName()) { + $dataArray['target_field_name'] = $data->getTargetFieldName(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\LookupFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/MultipleCollaboratorsFieldCreateFieldNormalizer.php b/generated/Normalizer/MultipleCollaboratorsFieldCreateFieldNormalizer.php index b07c0d3..06f397b 100644 --- a/generated/Normalizer/MultipleCollaboratorsFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/MultipleCollaboratorsFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,87 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class MultipleCollaboratorsFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class MultipleCollaboratorsFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('notify_user_when_added', $data)) { - $object->setNotifyUserWhenAdded($data['notify_user_when_added']); - unset($data['notify_user_when_added']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField(); + if (\array_key_exists('notify_user_when_added', $data) && \is_int($data['notify_user_when_added'])) { + $data['notify_user_when_added'] = (bool) $data['notify_user_when_added']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('notifyUserWhenAdded') && null !== $object->getNotifyUserWhenAdded()) { - $data['notify_user_when_added'] = $object->getNotifyUserWhenAdded(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('notify_user_when_added', $data)) { + $object->setNotifyUserWhenAdded($data['notify_user_when_added']); + unset($data['notify_user_when_added']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => false]; - } + return $object; } -} else { - class MultipleCollaboratorsFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class === get_class($data); + if ($data->isInitialized('notifyUserWhenAdded') && null !== $data->getNotifyUserWhenAdded()) { + $dataArray['notify_user_when_added'] = $data->getNotifyUserWhenAdded(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('notify_user_when_added', $data)) { - $object->setNotifyUserWhenAdded($data['notify_user_when_added']); - unset($data['notify_user_when_added']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('notifyUserWhenAdded') && null !== $object->getNotifyUserWhenAdded()) { - $data['notify_user_when_added'] = $object->getNotifyUserWhenAdded(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/MultipleCollaboratorsFieldFieldNormalizer.php b/generated/Normalizer/MultipleCollaboratorsFieldFieldNormalizer.php index 70b0693..7a9905a 100644 --- a/generated/Normalizer/MultipleCollaboratorsFieldFieldNormalizer.php +++ b/generated/Normalizer/MultipleCollaboratorsFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,217 +20,116 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class MultipleCollaboratorsFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class MultipleCollaboratorsFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('notify_user_when_added', $data)) { - $object->setNotifyUserWhenAdded($data['notify_user_when_added']); - unset($data['notify_user_when_added']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('notify_user_when_added', $data) && \is_int($data['notify_user_when_added'])) { + $data['notify_user_when_added'] = (bool) $data['notify_user_when_added']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('notifyUserWhenAdded') && null !== $object->getNotifyUserWhenAdded()) { - $data['notify_user_when_added'] = $object->getNotifyUserWhenAdded(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('notify_user_when_added', $data)) { + $object->setNotifyUserWhenAdded($data['notify_user_when_added']); + unset($data['notify_user_when_added']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => false]; - } + return $object; } -} else { - class MultipleCollaboratorsFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('notify_user_when_added', $data)) { - $object->setNotifyUserWhenAdded($data['notify_user_when_added']); - unset($data['notify_user_when_added']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('notifyUserWhenAdded') && null !== $data->getNotifyUserWhenAdded()) { + $dataArray['notify_user_when_added'] = $data->getNotifyUserWhenAdded(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('notifyUserWhenAdded') && null !== $object->getNotifyUserWhenAdded()) { - $data['notify_user_when_added'] = $object->getNotifyUserWhenAdded(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldField::class => false]; } } diff --git a/generated/Normalizer/MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer.php index 37a91bc..c578726 100644 --- a/generated/Normalizer/MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,233 +20,124 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('notify_user_when_added', $data)) { - $object->setNotifyUserWhenAdded($data['notify_user_when_added']); - unset($data['notify_user_when_added']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('notify_user_when_added', $data) && \is_int($data['notify_user_when_added'])) { + $data['notify_user_when_added'] = (bool) $data['notify_user_when_added']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('notifyUserWhenAdded') && null !== $object->getNotifyUserWhenAdded()) { - $data['notify_user_when_added'] = $object->getNotifyUserWhenAdded(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('notify_user_when_added', $data)) { + $object->setNotifyUserWhenAdded($data['notify_user_when_added']); + unset($data['notify_user_when_added']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class MultipleCollaboratorsFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('notify_user_when_added', $data)) { - $object->setNotifyUserWhenAdded($data['notify_user_when_added']); - unset($data['notify_user_when_added']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('notifyUserWhenAdded') && null !== $data->getNotifyUserWhenAdded()) { + $dataArray['notify_user_when_added'] = $data->getNotifyUserWhenAdded(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('notifyUserWhenAdded') && null !== $object->getNotifyUserWhenAdded()) { - $data['notify_user_when_added'] = $object->getNotifyUserWhenAdded(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/MultipleCollaboratorsFieldUpdateFieldNormalizer.php b/generated/Normalizer/MultipleCollaboratorsFieldUpdateFieldNormalizer.php index 4e133bf..d06314f 100644 --- a/generated/Normalizer/MultipleCollaboratorsFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/MultipleCollaboratorsFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,179 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class MultipleCollaboratorsFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class MultipleCollaboratorsFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('notify_user_when_added', $data)) { - $object->setNotifyUserWhenAdded($data['notify_user_when_added']); - unset($data['notify_user_when_added']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField(); + if (\array_key_exists('notify_user_when_added', $data) && \is_int($data['notify_user_when_added'])) { + $data['notify_user_when_added'] = (bool) $data['notify_user_when_added']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('notifyUserWhenAdded') && null !== $object->getNotifyUserWhenAdded()) { - $data['notify_user_when_added'] = $object->getNotifyUserWhenAdded(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('notify_user_when_added', $data)) { + $object->setNotifyUserWhenAdded($data['notify_user_when_added']); + unset($data['notify_user_when_added']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => false]; - } + return $object; } -} else { - class MultipleCollaboratorsFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('notify_user_when_added', $data)) { - $object->setNotifyUserWhenAdded($data['notify_user_when_added']); - unset($data['notify_user_when_added']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('notifyUserWhenAdded') && null !== $object->getNotifyUserWhenAdded()) { - $data['notify_user_when_added'] = $object->getNotifyUserWhenAdded(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('notifyUserWhenAdded') && null !== $data->getNotifyUserWhenAdded()) { + $dataArray['notify_user_when_added'] = $data->getNotifyUserWhenAdded(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\MultipleCollaboratorsFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/MultipleSelectFieldCreateFieldNormalizer.php b/generated/Normalizer/MultipleSelectFieldCreateFieldNormalizer.php index 7f6d16e..f8c977c 100644 --- a/generated/Normalizer/MultipleSelectFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/MultipleSelectFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,187 +20,92 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class MultipleSelectFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class MultipleSelectFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('select_options', $data)) { + $values = []; + foreach ($data['select_options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSelectOptions($values); + unset($data['select_options']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => false]; - } + return $object; } -} else { - class MultipleSelectFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); + if ($data->isInitialized('selectOptions') && null !== $data->getSelectOptions()) { + $values = []; + foreach ($data->getSelectOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + $dataArray['select_options'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/MultipleSelectFieldFieldNormalizer.php b/generated/Normalizer/MultipleSelectFieldFieldNormalizer.php index fec7430..092ce88 100644 --- a/generated/Normalizer/MultipleSelectFieldFieldNormalizer.php +++ b/generated/Normalizer/MultipleSelectFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,233 +20,121 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class MultipleSelectFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class MultipleSelectFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('select_options', $data)) { + $values = []; + foreach ($data['select_options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSelectOptions($values); + unset($data['select_options']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => false]; - } + return $object; } -} else { - class MultipleSelectFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + if ($data->isInitialized('selectOptions') && null !== $data->getSelectOptions()) { + $values = []; + foreach ($data->getSelectOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + $dataArray['select_options'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldField::class => false]; } } diff --git a/generated/Normalizer/MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer.php index 3c1e23a..fba78fd 100644 --- a/generated/Normalizer/MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,249 +20,129 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('select_options', $data)) { - $values_1 = []; - foreach ($data['select_options'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values_1); - unset($data['select_options']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('select_options', $data)) { + $values_1 = []; + foreach ($data['select_options'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSelectOptions($values_1); + unset($data['select_options']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class MultipleSelectFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); + if ($data->isInitialized('selectOptions') && null !== $data->getSelectOptions()) { + $values = []; + foreach ($data->getSelectOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('select_options', $data)) { - $values_1 = []; - foreach ($data['select_options'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values_1); - unset($data['select_options']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; + $dataArray['select_options'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/MultipleSelectFieldUpdateFieldNormalizer.php b/generated/Normalizer/MultipleSelectFieldUpdateFieldNormalizer.php index 1b31347..3d7f14d 100644 --- a/generated/Normalizer/MultipleSelectFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/MultipleSelectFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class MultipleSelectFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class MultipleSelectFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('select_options', $data)) { + $values = []; + foreach ($data['select_options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSelectOptions($values); + unset($data['select_options']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => false]; - } + return $object; } -} else { - class MultipleSelectFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + if ($data->isInitialized('selectOptions') && null !== $data->getSelectOptions()) { + $values = []; + foreach ($data->getSelectOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['select_options'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\MultipleSelectFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/NotificationRecipientNormalizer.php b/generated/Normalizer/NotificationRecipientNormalizer.php index 00588fa..886d5a2 100644 --- a/generated/Normalizer/NotificationRecipientNormalizer.php +++ b/generated/Normalizer/NotificationRecipientNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,191 +20,97 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NotificationRecipientNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NotificationRecipientNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationRecipient(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('sender', $data)) { - $object->setSender($this->denormalizer->denormalize($data['sender'], \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class, 'json', $context)); - unset($data['sender']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('read', $data)) { - $object->setRead($data['read']); - unset($data['read']); - } - if (\array_key_exists('data', $data)) { - $object->setData($data['data']); - unset($data['data']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NotificationRecipient(); + if (\array_key_exists('read', $data) && \is_int($data['read'])) { + $data['read'] = (bool) $data['read']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['type'] = $object->getType(); - $data['sender'] = $this->normalizer->normalize($object->getSender(), 'json', $context); - $data['created_on'] = $object->getCreatedOn()?->format('Y-m-d\TH:i:sP'); - if ($object->isInitialized('read') && null !== $object->getRead()) { - $data['read'] = $object->getRead(); - } - $data['data'] = $object->getData(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class NotificationRecipientNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class === $type; + if (\array_key_exists('sender', $data)) { + $object->setSender($this->denormalizer->denormalize($data['sender'], \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class, 'json', $context)); + unset($data['sender']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class === get_class($data); + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationRecipient(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('sender', $data)) { - $object->setSender($this->denormalizer->denormalize($data['sender'], \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class, 'json', $context)); - unset($data['sender']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('read', $data)) { - $object->setRead($data['read']); - unset($data['read']); - } - if (\array_key_exists('data', $data)) { - $object->setData($data['data']); - unset($data['data']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('read', $data)) { + $object->setRead($data['read']); + unset($data['read']); + } + if (\array_key_exists('data', $data)) { + $object->setData($data['data']); + unset($data['data']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['type'] = $object->getType(); - $data['sender'] = $this->normalizer->normalize($object->getSender(), 'json', $context); - $data['created_on'] = $object->getCreatedOn()?->format('Y-m-d\TH:i:sP'); - if ($object->isInitialized('read') && null !== $object->getRead()) { - $data['read'] = $object->getRead(); - } - $data['data'] = $object->getData(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['type'] = $data->getType(); + $dataArray['sender'] = $this->normalizer->normalize($data->getSender(), 'json', $context); + $dataArray['created_on'] = $data->getCreatedOn()?->format('Y-m-d\TH:i:sP'); + if ($data->isInitialized('read') && null !== $data->getRead()) { + $dataArray['read'] = $data->getRead(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => false]; + $dataArray['data'] = $data->getData(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NotificationRecipient::class => false]; } } diff --git a/generated/Normalizer/NotificationRecipientSenderNormalizer.php b/generated/Normalizer/NotificationRecipientSenderNormalizer.php index f61cc16..0b3ec12 100644 --- a/generated/Normalizer/NotificationRecipientSenderNormalizer.php +++ b/generated/Normalizer/NotificationRecipientSenderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NotificationRecipientSenderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NotificationRecipientSenderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['username'] = $object->getUsername(); - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => false]; + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); } - } -} else { - class NotificationRecipientSenderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class === $type; + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationRecipientSender(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['username'] = $data->getUsername(); + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['username'] = $object->getUsername(); - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NotificationRecipientSender::class => false]; } } diff --git a/generated/Normalizer/NotificationWorkflowActionBuilderWorkflowActionNormalizer.php b/generated/Normalizer/NotificationWorkflowActionBuilderWorkflowActionNormalizer.php index 075ee4f..3888274 100644 --- a/generated/Normalizer/NotificationWorkflowActionBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/NotificationWorkflowActionBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NotificationWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NotificationWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + unset($data['title']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => false]; - } + return $object; } -} else { - class NotificationWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['order'] = $data->getOrder(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('title') && null !== $data->getTitle()) { + $dataArray['title'] = $data->getTitle(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer.php b/generated/Normalizer/NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer.php index a7b7a3f..72ca6af 100644 --- a/generated/Normalizer/NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,193 +20,95 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + unset($data['title']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + return $object; } -} else { - class NotificationWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('elementId') && null !== $data->getElementId()) { + $dataArray['element_id'] = $data->getElementId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + $dataArray['type'] = $data->getType(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('title') && null !== $data->getTitle()) { + $dataArray['title'] = $data->getTitle(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionCreateBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php b/generated/Normalizer/NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php index 721e621..91cc9ac 100644 --- a/generated/Normalizer/NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php +++ b/generated/Normalizer/NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + unset($data['title']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + return $object; } -} else { - class NotificationWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + if ($data->isInitialized('title') && null !== $data->getTitle()) { + $dataArray['title'] = $data->getTitle(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NotificationWorkflowActionUpdateBuilderWorkflowActions::class => false]; } } diff --git a/generated/Normalizer/NumberFieldCreateFieldNormalizer.php b/generated/Normalizer/NumberFieldCreateFieldNormalizer.php index 4d79c52..3c55103 100644 --- a/generated/Normalizer/NumberFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/NumberFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,94 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('number_decimal_places', $data)) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } - if (\array_key_exists('number_negative', $data)) { - $object->setNumberNegative($data['number_negative']); - unset($data['number_negative']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField(); + if (\array_key_exists('number_negative', $data) && \is_int($data['number_negative'])) { + $data['number_negative'] = (bool) $data['number_negative']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('numberNegative') && null !== $object->getNumberNegative()) { - $data['number_negative'] = $object->getNumberNegative(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('number_decimal_places', $data)) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } + if (\array_key_exists('number_negative', $data)) { + $object->setNumberNegative($data['number_negative']); + unset($data['number_negative']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => false]; - } + return $object; } -} else { - class NumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class === get_class($data); + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('number_decimal_places', $data)) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } - if (\array_key_exists('number_negative', $data)) { - $object->setNumberNegative($data['number_negative']); - unset($data['number_negative']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('numberNegative') && null !== $data->getNumberNegative()) { + $dataArray['number_negative'] = $data->getNumberNegative(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('numberNegative') && null !== $object->getNumberNegative()) { - $data['number_negative'] = $object->getNumberNegative(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NumberFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/NumberFieldFieldNormalizer.php b/generated/Normalizer/NumberFieldFieldNormalizer.php index 44fd1b8..65a2746 100644 --- a/generated/Normalizer/NumberFieldFieldNormalizer.php +++ b/generated/Normalizer/NumberFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,231 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NumberFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NumberFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('number_decimal_places', $data)) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } - if (\array_key_exists('number_negative', $data)) { - $object->setNumberNegative($data['number_negative']); - unset($data['number_negative']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('number_negative', $data) && \is_int($data['number_negative'])) { + $data['number_negative'] = (bool) $data['number_negative']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('numberNegative') && null !== $object->getNumberNegative()) { - $data['number_negative'] = $object->getNumberNegative(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('number_decimal_places', $data)) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } + if (\array_key_exists('number_negative', $data)) { + $object->setNumberNegative($data['number_negative']); + unset($data['number_negative']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NumberFieldField::class => false]; - } + return $object; } -} else { - class NumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NumberFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('number_decimal_places', $data)) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } - if (\array_key_exists('number_negative', $data)) { - $object->setNumberNegative($data['number_negative']); - unset($data['number_negative']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('numberNegative') && null !== $object->getNumberNegative()) { - $data['number_negative'] = $object->getNumberNegative(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('numberNegative') && null !== $data->getNumberNegative()) { + $dataArray['number_negative'] = $data->getNumberNegative(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NumberFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NumberFieldField::class => false]; } } diff --git a/generated/Normalizer/NumberFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/NumberFieldFieldSerializerWithRelatedFieldsNormalizer.php index cb88b6a..ea94ca6 100644 --- a/generated/Normalizer/NumberFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/NumberFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,247 +20,131 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('number_decimal_places', $data)) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } - if (\array_key_exists('number_negative', $data)) { - $object->setNumberNegative($data['number_negative']); - unset($data['number_negative']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('number_negative', $data) && \is_int($data['number_negative'])) { + $data['number_negative'] = (bool) $data['number_negative']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('numberNegative') && null !== $object->getNumberNegative()) { - $data['number_negative'] = $object->getNumberNegative(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('number_decimal_places', $data)) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } + if (\array_key_exists('number_negative', $data)) { + $object->setNumberNegative($data['number_negative']); + unset($data['number_negative']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class NumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('number_decimal_places', $data)) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } - if (\array_key_exists('number_negative', $data)) { - $object->setNumberNegative($data['number_negative']); - unset($data['number_negative']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('numberNegative') && null !== $object->getNumberNegative()) { - $data['number_negative'] = $object->getNumberNegative(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('numberNegative') && null !== $data->getNumberNegative()) { + $dataArray['number_negative'] = $data->getNumberNegative(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NumberFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/NumberFieldUpdateFieldNormalizer.php b/generated/Normalizer/NumberFieldUpdateFieldNormalizer.php index 21c8722..42a3293 100644 --- a/generated/Normalizer/NumberFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/NumberFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,193 +20,98 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class NumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('number_decimal_places', $data)) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } - if (\array_key_exists('number_negative', $data)) { - $object->setNumberNegative($data['number_negative']); - unset($data['number_negative']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField(); + if (\array_key_exists('number_negative', $data) && \is_int($data['number_negative'])) { + $data['number_negative'] = (bool) $data['number_negative']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('numberNegative') && null !== $object->getNumberNegative()) { - $data['number_negative'] = $object->getNumberNegative(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('number_decimal_places', $data)) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } + if (\array_key_exists('number_negative', $data)) { + $object->setNumberNegative($data['number_negative']); + unset($data['number_negative']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => false]; - } + return $object; } -} else { - class NumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('number_decimal_places', $data)) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } - if (\array_key_exists('number_negative', $data)) { - $object->setNumberNegative($data['number_negative']); - unset($data['number_negative']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('numberNegative') && null !== $object->getNumberNegative()) { - $data['number_negative'] = $object->getNumberNegative(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('numberNegative') && null !== $data->getNumberNegative()) { + $dataArray['number_negative'] = $data->getNumberNegative(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\NumberFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/OllamaSettingsNormalizer.php b/generated/Normalizer/OllamaSettingsNormalizer.php index b3b8f37..210b255 100644 --- a/generated/Normalizer/OllamaSettingsNormalizer.php +++ b/generated/Normalizer/OllamaSettingsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,163 +20,80 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OllamaSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OllamaSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OllamaSettings::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OllamaSettings::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OllamaSettings::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OllamaSettings::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OllamaSettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('models', $data)) { - $values = []; - foreach ($data['models'] as $value) { - $values[] = $value; - } - $object->setModels($values); - unset($data['models']); - } - if (\array_key_exists('host', $data)) { - $object->setHost($data['host']); - unset($data['host']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OllamaSettings(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('models') && null !== $object->getModels()) { - $values = []; - foreach ($object->getModels() as $value) { - $values[] = $value; - } - $data['models'] = $values; + if (\array_key_exists('models', $data)) { + $values = []; + foreach ($data['models'] as $value) { + $values[] = $value; } - if ($object->isInitialized('host') && null !== $object->getHost()) { - $data['host'] = $object->getHost(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setModels($values); + unset($data['models']); + } + if (\array_key_exists('host', $data)) { + $object->setHost($data['host']); + unset($data['host']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OllamaSettings::class => false]; - } + return $object; } -} else { - class OllamaSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OllamaSettings::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('models') && null !== $data->getModels()) { + $values = []; + foreach ($data->getModels() as $value) { + $values[] = $value; + } + $dataArray['models'] = $values; } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OllamaSettings::class === get_class($data); + if ($data->isInitialized('host') && null !== $data->getHost()) { + $dataArray['host'] = $data->getHost(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OllamaSettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('models', $data)) { - $values = []; - foreach ($data['models'] as $value) { - $values[] = $value; - } - $object->setModels($values); - unset($data['models']); - } - if (\array_key_exists('host', $data)) { - $object->setHost($data['host']); - unset($data['host']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('models') && null !== $object->getModels()) { - $values = []; - foreach ($object->getModels() as $value) { - $values[] = $value; - } - $data['models'] = $values; - } - if ($object->isInitialized('host') && null !== $object->getHost()) { - $data['host'] = $object->getHost(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OllamaSettings::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OllamaSettings::class => false]; } } diff --git a/generated/Normalizer/OpenAISettingsNormalizer.php b/generated/Normalizer/OpenAISettingsNormalizer.php index 0e3a949..0185651 100644 --- a/generated/Normalizer/OpenAISettingsNormalizer.php +++ b/generated/Normalizer/OpenAISettingsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,177 +20,87 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OpenAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OpenAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OpenAISettings::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenAISettings::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenAISettings::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenAISettings::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenAISettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('models', $data)) { - $values = []; - foreach ($data['models'] as $value) { - $values[] = $value; - } - $object->setModels($values); - unset($data['models']); - } - if (\array_key_exists('api_key', $data)) { - $object->setApiKey($data['api_key']); - unset($data['api_key']); - } - if (\array_key_exists('organization', $data)) { - $object->setOrganization($data['organization']); - unset($data['organization']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OpenAISettings(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('models') && null !== $object->getModels()) { - $values = []; - foreach ($object->getModels() as $value) { - $values[] = $value; - } - $data['models'] = $values; - } - if ($object->isInitialized('apiKey') && null !== $object->getApiKey()) { - $data['api_key'] = $object->getApiKey(); + if (\array_key_exists('models', $data)) { + $values = []; + foreach ($data['models'] as $value) { + $values[] = $value; } - if ($object->isInitialized('organization') && null !== $object->getOrganization()) { - $data['organization'] = $object->getOrganization(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setModels($values); + unset($data['models']); + } + if (\array_key_exists('api_key', $data)) { + $object->setApiKey($data['api_key']); + unset($data['api_key']); + } + if (\array_key_exists('organization', $data)) { + $object->setOrganization($data['organization']); + unset($data['organization']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenAISettings::class => false]; - } + return $object; } -} else { - class OpenAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenAISettings::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('models') && null !== $data->getModels()) { + $values = []; + foreach ($data->getModels() as $value) { + $values[] = $value; + } + $dataArray['models'] = $values; } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenAISettings::class === get_class($data); + if ($data->isInitialized('apiKey') && null !== $data->getApiKey()) { + $dataArray['api_key'] = $data->getApiKey(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenAISettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('models', $data)) { - $values = []; - foreach ($data['models'] as $value) { - $values[] = $value; - } - $object->setModels($values); - unset($data['models']); - } - if (\array_key_exists('api_key', $data)) { - $object->setApiKey($data['api_key']); - unset($data['api_key']); - } - if (\array_key_exists('organization', $data)) { - $object->setOrganization($data['organization']); - unset($data['organization']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('organization') && null !== $data->getOrganization()) { + $dataArray['organization'] = $data->getOrganization(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('models') && null !== $object->getModels()) { - $values = []; - foreach ($object->getModels() as $value) { - $values[] = $value; - } - $data['models'] = $values; - } - if ($object->isInitialized('apiKey') && null !== $object->getApiKey()) { - $data['api_key'] = $object->getApiKey(); - } - if ($object->isInitialized('organization') && null !== $object->getOrganization()) { - $data['organization'] = $object->getOrganization(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenAISettings::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OpenAISettings::class => false]; } } diff --git a/generated/Normalizer/OpenApiRoleAssignmentNormalizer.php b/generated/Normalizer/OpenApiRoleAssignmentNormalizer.php index e25ca44..40a45f7 100644 --- a/generated/Normalizer/OpenApiRoleAssignmentNormalizer.php +++ b/generated/Normalizer/OpenApiRoleAssignmentNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,187 +20,92 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OpenApiRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OpenApiRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('role', $data)) { - $object->setRole($data['role']); - unset($data['role']); - } - if (\array_key_exists('subject', $data)) { - $object->setSubject($this->denormalizer->denormalize($data['subject'], \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class, 'json', $context)); - unset($data['subject']); - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('scope_id', $data)) { - $object->setScopeId($data['scope_id']); - unset($data['scope_id']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - if (\array_key_exists('scope_type', $data)) { - $object->setScopeType($data['scope_type']); - unset($data['scope_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['role'] = $object->getRole(); - $data['subject'] = $this->normalizer->normalize($object->getSubject(), 'json', $context); - $data['subject_id'] = $object->getSubjectId(); - $data['scope_id'] = $object->getScopeId(); - $data['subject_type'] = $object->getSubjectType(); - $data['scope_type'] = $object->getScopeType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => false]; + if (\array_key_exists('role', $data)) { + $object->setRole($data['role']); + unset($data['role']); } - } -} else { - class OpenApiRoleAssignmentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class === $type; + if (\array_key_exists('subject', $data)) { + $object->setSubject($this->denormalizer->denormalize($data['subject'], \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class, 'json', $context)); + unset($data['subject']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class === get_class($data); + if (\array_key_exists('subject_id', $data)) { + $object->setSubjectId($data['subject_id']); + unset($data['subject_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('role', $data)) { - $object->setRole($data['role']); - unset($data['role']); - } - if (\array_key_exists('subject', $data)) { - $object->setSubject($this->denormalizer->denormalize($data['subject'], \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class, 'json', $context)); - unset($data['subject']); - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('scope_id', $data)) { - $object->setScopeId($data['scope_id']); - unset($data['scope_id']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - if (\array_key_exists('scope_type', $data)) { - $object->setScopeType($data['scope_type']); - unset($data['scope_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('scope_id', $data)) { + $object->setScopeId($data['scope_id']); + unset($data['scope_id']); + } + if (\array_key_exists('subject_type', $data)) { + $object->setSubjectType($data['subject_type']); + unset($data['subject_type']); + } + if (\array_key_exists('scope_type', $data)) { + $object->setScopeType($data['scope_type']); + unset($data['scope_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['role'] = $object->getRole(); - $data['subject'] = $this->normalizer->normalize($object->getSubject(), 'json', $context); - $data['subject_id'] = $object->getSubjectId(); - $data['scope_id'] = $object->getScopeId(); - $data['subject_type'] = $object->getSubjectType(); - $data['scope_type'] = $object->getScopeType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['role'] = $data->getRole(); + $dataArray['subject'] = $this->normalizer->normalize($data->getSubject(), 'json', $context); + $dataArray['subject_id'] = $data->getSubjectId(); + $dataArray['scope_id'] = $data->getScopeId(); + $dataArray['subject_type'] = $data->getSubjectType(); + $dataArray['scope_type'] = $data->getScopeType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignment::class => false]; } } diff --git a/generated/Normalizer/OpenApiRoleAssignmentSubjectNormalizer.php b/generated/Normalizer/OpenApiRoleAssignmentSubjectNormalizer.php index 40cb604..738e4a8 100644 --- a/generated/Normalizer/OpenApiRoleAssignmentSubjectNormalizer.php +++ b/generated/Normalizer/OpenApiRoleAssignmentSubjectNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OpenApiRoleAssignmentSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OpenApiRoleAssignmentSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => false]; - } + return $object; } -} else { - class OpenApiRoleAssignmentSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OpenApiRoleAssignmentSubject::class => false]; } } diff --git a/generated/Normalizer/OpenApiSubjectFieldNormalizer.php b/generated/Normalizer/OpenApiSubjectFieldNormalizer.php index d645364..f8274a2 100644 --- a/generated/Normalizer/OpenApiSubjectFieldNormalizer.php +++ b/generated/Normalizer/OpenApiSubjectFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OpenApiSubjectFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OpenApiSubjectFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => false]; - } + return $object; } -} else { - class OpenApiSubjectFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenApiSubjectField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OpenApiSubjectField::class => false]; } } diff --git a/generated/Normalizer/OpenIdConnectAuthProviderModelAuthProviderNormalizer.php b/generated/Normalizer/OpenIdConnectAuthProviderModelAuthProviderNormalizer.php index 0f6ed24..fd47058 100644 --- a/generated/Normalizer/OpenIdConnectAuthProviderModelAuthProviderNormalizer.php +++ b/generated/Normalizer/OpenIdConnectAuthProviderModelAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,207 +20,105 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OpenIdConnectAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OpenIdConnectAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('base_url', $data)) { - $object->setBaseUrl($data['base_url']); - unset($data['base_url']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider(); + if (\array_key_exists('enabled', $data) && \is_int($data['enabled'])) { + $data['enabled'] = (bool) $data['enabled']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['base_url'] = $object->getBaseUrl(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('domain', $data) && null !== $data['domain']) { + $object->setDomain($data['domain']); + unset($data['domain']); + } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { + $object->setDomain(null); + } + if (\array_key_exists('enabled', $data)) { + $object->setEnabled($data['enabled']); + unset($data['enabled']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('base_url', $data)) { + $object->setBaseUrl($data['base_url']); + unset($data['base_url']); + } + if (\array_key_exists('client_id', $data)) { + $object->setClientId($data['client_id']); + unset($data['client_id']); + } + if (\array_key_exists('secret', $data)) { + $object->setSecret($data['secret']); + unset($data['secret']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => false]; - } + return $object; } -} else { - class OpenIdConnectAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('domain') && null !== $data->getDomain()) { + $dataArray['domain'] = $data->getDomain(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class === get_class($data); + if ($data->isInitialized('enabled') && null !== $data->getEnabled()) { + $dataArray['enabled'] = $data->getEnabled(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data) && null !== $data['domain']) { - $object->setDomain($data['domain']); - unset($data['domain']); - } elseif (\array_key_exists('domain', $data) && null === $data['domain']) { - $object->setDomain(null); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); + $dataArray['name'] = $data->getName(); + $dataArray['base_url'] = $data->getBaseUrl(); + $dataArray['client_id'] = $data->getClientId(); + $dataArray['secret'] = $data->getSecret(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('base_url', $data)) { - $object->setBaseUrl($data['base_url']); - unset($data['base_url']); - } - if (\array_key_exists('client_id', $data)) { - $object->setClientId($data['client_id']); - unset($data['client_id']); - } - if (\array_key_exists('secret', $data)) { - $object->setSecret($data['secret']); - unset($data['secret']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['name'] = $object->getName(); - $data['base_url'] = $object->getBaseUrl(); - $data['client_id'] = $object->getClientId(); - $data['secret'] = $object->getSecret(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OpenIdConnectAuthProviderModelAuthProvider::class => false]; } } diff --git a/generated/Normalizer/OpenPageWorkflowActionBuilderWorkflowActionNormalizer.php b/generated/Normalizer/OpenPageWorkflowActionBuilderWorkflowActionNormalizer.php index f4d4178..803ec2a 100644 --- a/generated/Normalizer/OpenPageWorkflowActionBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/OpenPageWorkflowActionBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,271 +20,134 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OpenPageWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OpenPageWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('navigation_type', $data)) { + $object->setNavigationType($data['navigation_type']); + unset($data['navigation_type']); + } + if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { + $object->setNavigateToPageId($data['navigate_to_page_id']); + unset($data['navigate_to_page_id']); + } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { + $object->setNavigateToPageId(null); + } + if (\array_key_exists('navigate_to_url', $data)) { + $object->setNavigateToUrl($data['navigate_to_url']); + unset($data['navigate_to_url']); + } + if (\array_key_exists('page_parameters', $data)) { + $values = []; + foreach ($data['page_parameters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPageParameters($values); + unset($data['page_parameters']); + } + if (\array_key_exists('target', $data)) { + $object->setTarget($data['target']); + unset($data['target']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => false]; - } + return $object; } -} else { - class OpenPageWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['order'] = $data->getOrder(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('navigationType') && null !== $data->getNavigationType()) { + $dataArray['navigation_type'] = $data->getNavigationType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class === get_class($data); + if ($data->isInitialized('navigateToPageId') && null !== $data->getNavigateToPageId()) { + $dataArray['navigate_to_page_id'] = $data->getNavigateToPageId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('navigateToUrl') && null !== $data->getNavigateToUrl()) { + $dataArray['navigate_to_url'] = $data->getNavigateToUrl(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); + if ($data->isInitialized('pageParameters') && null !== $data->getPageParameters()) { + $values = []; + foreach ($data->getPageParameters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['page_parameters'] = $values; + } + if ($data->isInitialized('target') && null !== $data->getTarget()) { + $dataArray['target'] = $data->getTarget(); + } + if ($data->isInitialized('url') && null !== $data->getUrl()) { + $dataArray['url'] = $data->getUrl(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer.php b/generated/Normalizer/OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer.php index 65c5fb0..38a10ea 100644 --- a/generated/Normalizer/OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,269 +20,133 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('navigation_type', $data)) { + $object->setNavigationType($data['navigation_type']); + unset($data['navigation_type']); + } + if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { + $object->setNavigateToPageId($data['navigate_to_page_id']); + unset($data['navigate_to_page_id']); + } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { + $object->setNavigateToPageId(null); + } + if (\array_key_exists('navigate_to_url', $data)) { + $object->setNavigateToUrl($data['navigate_to_url']); + unset($data['navigate_to_url']); + } + if (\array_key_exists('page_parameters', $data)) { + $values = []; + foreach ($data['page_parameters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPageParameters($values); + unset($data['page_parameters']); + } + if (\array_key_exists('target', $data)) { + $object->setTarget($data['target']); + unset($data['target']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + return $object; } -} else { - class OpenPageWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('elementId') && null !== $data->getElementId()) { + $dataArray['element_id'] = $data->getElementId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + $dataArray['type'] = $data->getType(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('navigationType') && null !== $data->getNavigationType()) { + $dataArray['navigation_type'] = $data->getNavigationType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('navigateToPageId') && null !== $data->getNavigateToPageId()) { + $dataArray['navigate_to_page_id'] = $data->getNavigateToPageId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); + if ($data->isInitialized('navigateToUrl') && null !== $data->getNavigateToUrl()) { + $dataArray['navigate_to_url'] = $data->getNavigateToUrl(); + } + if ($data->isInitialized('pageParameters') && null !== $data->getPageParameters()) { + $values = []; + foreach ($data->getPageParameters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['page_parameters'] = $values; + } + if ($data->isInitialized('target') && null !== $data->getTarget()) { + $dataArray['target'] = $data->getTarget(); + } + if ($data->isInitialized('url') && null !== $data->getUrl()) { + $dataArray['url'] = $data->getUrl(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionCreateBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php b/generated/Normalizer/OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php index 72ca0ae..59c11e1 100644 --- a/generated/Normalizer/OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php +++ b/generated/Normalizer/OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,237 +20,117 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('navigation_type', $data)) { + $object->setNavigationType($data['navigation_type']); + unset($data['navigation_type']); + } + if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { + $object->setNavigateToPageId($data['navigate_to_page_id']); + unset($data['navigate_to_page_id']); + } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { + $object->setNavigateToPageId(null); + } + if (\array_key_exists('navigate_to_url', $data)) { + $object->setNavigateToUrl($data['navigate_to_url']); + unset($data['navigate_to_url']); + } + if (\array_key_exists('page_parameters', $data)) { + $values = []; + foreach ($data['page_parameters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPageParameters($values); + unset($data['page_parameters']); + } + if (\array_key_exists('target', $data)) { + $object->setTarget($data['target']); + unset($data['target']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + return $object; } -} else { - class OpenPageWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + if ($data->isInitialized('navigationType') && null !== $data->getNavigationType()) { + $dataArray['navigation_type'] = $data->getNavigationType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('navigation_type', $data)) { - $object->setNavigationType($data['navigation_type']); - unset($data['navigation_type']); - } - if (\array_key_exists('navigate_to_page_id', $data) && null !== $data['navigate_to_page_id']) { - $object->setNavigateToPageId($data['navigate_to_page_id']); - unset($data['navigate_to_page_id']); - } elseif (\array_key_exists('navigate_to_page_id', $data) && null === $data['navigate_to_page_id']) { - $object->setNavigateToPageId(null); - } - if (\array_key_exists('navigate_to_url', $data)) { - $object->setNavigateToUrl($data['navigate_to_url']); - unset($data['navigate_to_url']); - } - if (\array_key_exists('page_parameters', $data)) { - $values = []; - foreach ($data['page_parameters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PageParameterValue::class, 'json', $context); - } - $object->setPageParameters($values); - unset($data['page_parameters']); - } - if (\array_key_exists('target', $data)) { - $object->setTarget($data['target']); - unset($data['target']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('navigateToPageId') && null !== $data->getNavigateToPageId()) { + $dataArray['navigate_to_page_id'] = $data->getNavigateToPageId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('navigationType') && null !== $object->getNavigationType()) { - $data['navigation_type'] = $object->getNavigationType(); - } - if ($object->isInitialized('navigateToPageId') && null !== $object->getNavigateToPageId()) { - $data['navigate_to_page_id'] = $object->getNavigateToPageId(); - } - if ($object->isInitialized('navigateToUrl') && null !== $object->getNavigateToUrl()) { - $data['navigate_to_url'] = $object->getNavigateToUrl(); - } - if ($object->isInitialized('pageParameters') && null !== $object->getPageParameters()) { - $values = []; - foreach ($object->getPageParameters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['page_parameters'] = $values; - } - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['target'] = $object->getTarget(); - } - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); + if ($data->isInitialized('navigateToUrl') && null !== $data->getNavigateToUrl()) { + $dataArray['navigate_to_url'] = $data->getNavigateToUrl(); + } + if ($data->isInitialized('pageParameters') && null !== $data->getPageParameters()) { + $values = []; + foreach ($data->getPageParameters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['page_parameters'] = $values; + } + if ($data->isInitialized('target') && null !== $data->getTarget()) { + $dataArray['target'] = $data->getTarget(); + } + if ($data->isInitialized('url') && null !== $data->getUrl()) { + $dataArray['url'] = $data->getUrl(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OpenPageWorkflowActionUpdateBuilderWorkflowActions::class => false]; } } diff --git a/generated/Normalizer/OrderApplicationsNormalizer.php b/generated/Normalizer/OrderApplicationsNormalizer.php index af4ec7a..7adf42f 100644 --- a/generated/Normalizer/OrderApplicationsNormalizer.php +++ b/generated/Normalizer/OrderApplicationsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OrderApplicationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OrderApplicationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OrderApplications::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderApplications::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderApplications::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderApplications::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OrderApplications(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('application_ids', $data)) { - $values = []; - foreach ($data['application_ids'] as $value) { - $values[] = $value; - } - $object->setApplicationIds($values); - unset($data['application_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OrderApplications(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('application_ids', $data)) { $values = []; - foreach ($object->getApplicationIds() as $value) { + foreach ($data['application_ids'] as $value) { $values[] = $value; } - $data['application_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setApplicationIds($values); + unset($data['application_ids']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderApplications::class => false]; - } + return $object; } -} else { - class OrderApplicationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderApplications::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderApplications::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getApplicationIds() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['application_ids'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\OrderApplications(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('application_ids', $data)) { - $values = []; - foreach ($data['application_ids'] as $value) { - $values[] = $value; - } - $object->setApplicationIds($values); - unset($data['application_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getApplicationIds() as $value) { - $values[] = $value; - } - $data['application_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderApplications::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OrderApplications::class => false]; } } diff --git a/generated/Normalizer/OrderDomainsNormalizer.php b/generated/Normalizer/OrderDomainsNormalizer.php index 0cf268b..948de04 100644 --- a/generated/Normalizer/OrderDomainsNormalizer.php +++ b/generated/Normalizer/OrderDomainsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OrderDomainsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OrderDomainsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OrderDomains::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderDomains::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderDomains::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderDomains::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OrderDomains(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('domain_ids', $data)) { - $values = []; - foreach ($data['domain_ids'] as $value) { - $values[] = $value; - } - $object->setDomainIds($values); - unset($data['domain_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OrderDomains(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('domain_ids', $data)) { $values = []; - foreach ($object->getDomainIds() as $value) { + foreach ($data['domain_ids'] as $value) { $values[] = $value; } - $data['domain_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setDomainIds($values); + unset($data['domain_ids']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderDomains::class => false]; - } + return $object; } -} else { - class OrderDomainsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderDomains::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderDomains::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getDomainIds() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['domain_ids'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\OrderDomains(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('domain_ids', $data)) { - $values = []; - foreach ($data['domain_ids'] as $value) { - $values[] = $value; - } - $object->setDomainIds($values); - unset($data['domain_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getDomainIds() as $value) { - $values[] = $value; - } - $data['domain_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderDomains::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OrderDomains::class => false]; } } diff --git a/generated/Normalizer/OrderPagesNormalizer.php b/generated/Normalizer/OrderPagesNormalizer.php index b83f42a..575c5fd 100644 --- a/generated/Normalizer/OrderPagesNormalizer.php +++ b/generated/Normalizer/OrderPagesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OrderPagesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OrderPagesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OrderPages::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderPages::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderPages::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderPages::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OrderPages(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('page_ids', $data)) { - $values = []; - foreach ($data['page_ids'] as $value) { - $values[] = $value; - } - $object->setPageIds($values); - unset($data['page_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OrderPages(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('page_ids', $data)) { $values = []; - foreach ($object->getPageIds() as $value) { + foreach ($data['page_ids'] as $value) { $values[] = $value; } - $data['page_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPageIds($values); + unset($data['page_ids']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderPages::class => false]; - } + return $object; } -} else { - class OrderPagesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderPages::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderPages::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getPageIds() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['page_ids'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\OrderPages(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('page_ids', $data)) { - $values = []; - foreach ($data['page_ids'] as $value) { - $values[] = $value; - } - $object->setPageIds($values); - unset($data['page_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getPageIds() as $value) { - $values[] = $value; - } - $data['page_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderPages::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OrderPages::class => false]; } } diff --git a/generated/Normalizer/OrderTablesNormalizer.php b/generated/Normalizer/OrderTablesNormalizer.php index 4685ae1..50deee8 100644 --- a/generated/Normalizer/OrderTablesNormalizer.php +++ b/generated/Normalizer/OrderTablesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OrderTablesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OrderTablesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OrderTables::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderTables::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderTables::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderTables::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OrderTables(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('table_ids', $data)) { - $values = []; - foreach ($data['table_ids'] as $value) { - $values[] = $value; - } - $object->setTableIds($values); - unset($data['table_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OrderTables(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('table_ids', $data)) { $values = []; - foreach ($object->getTableIds() as $value) { + foreach ($data['table_ids'] as $value) { $values[] = $value; } - $data['table_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setTableIds($values); + unset($data['table_ids']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderTables::class => false]; - } + return $object; } -} else { - class OrderTablesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderTables::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderTables::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getTableIds() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['table_ids'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\OrderTables(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('table_ids', $data)) { - $values = []; - foreach ($data['table_ids'] as $value) { - $values[] = $value; - } - $object->setTableIds($values); - unset($data['table_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getTableIds() as $value) { - $values[] = $value; - } - $data['table_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderTables::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OrderTables::class => false]; } } diff --git a/generated/Normalizer/OrderViewsNormalizer.php b/generated/Normalizer/OrderViewsNormalizer.php index a372ab9..45881a3 100644 --- a/generated/Normalizer/OrderViewsNormalizer.php +++ b/generated/Normalizer/OrderViewsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OrderViewsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OrderViewsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OrderViews::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderViews::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderViews::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderViews::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OrderViews(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('view_ids', $data)) { - $values = []; - foreach ($data['view_ids'] as $value) { - $values[] = $value; - } - $object->setViewIds($values); - unset($data['view_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OrderViews(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('view_ids', $data)) { $values = []; - foreach ($object->getViewIds() as $value) { + foreach ($data['view_ids'] as $value) { $values[] = $value; } - $data['view_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setViewIds($values); + unset($data['view_ids']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderViews::class => false]; - } + return $object; } -} else { - class OrderViewsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderViews::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderViews::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getViewIds() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['view_ids'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\OrderViews(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('view_ids', $data)) { - $values = []; - foreach ($data['view_ids'] as $value) { - $values[] = $value; - } - $object->setViewIds($values); - unset($data['view_ids']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getViewIds() as $value) { - $values[] = $value; - } - $data['view_ids'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderViews::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OrderViews::class => false]; } } diff --git a/generated/Normalizer/OrderWorkflowActionsNormalizer.php b/generated/Normalizer/OrderWorkflowActionsNormalizer.php index 9ecbd43..3f6969e 100644 --- a/generated/Normalizer/OrderWorkflowActionsNormalizer.php +++ b/generated/Normalizer/OrderWorkflowActionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,159 +20,78 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OrderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OrderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('workflow_action_ids', $data)) { - $values = []; - foreach ($data['workflow_action_ids'] as $value) { - $values[] = $value; - } - $object->setWorkflowActionIds($values); - unset($data['workflow_action_ids']); - } - if (\array_key_exists('element_id', $data)) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('workflow_action_ids', $data)) { $values = []; - foreach ($object->getWorkflowActionIds() as $value) { + foreach ($data['workflow_action_ids'] as $value) { $values[] = $value; } - $data['workflow_action_ids'] = $values; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setWorkflowActionIds($values); + unset($data['workflow_action_ids']); + } + if (\array_key_exists('element_id', $data)) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => false]; - } + return $object; } -} else { - class OrderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getWorkflowActionIds() as $value) { + $values[] = $value; } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class === get_class($data); + $dataArray['workflow_action_ids'] = $values; + if ($data->isInitialized('elementId') && null !== $data->getElementId()) { + $dataArray['element_id'] = $data->getElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OrderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - if (\array_key_exists('workflow_action_ids', $data)) { - $values = []; - foreach ($data['workflow_action_ids'] as $value) { - $values[] = $value; - } - $object->setWorkflowActionIds($values); - unset($data['workflow_action_ids']); - } - if (\array_key_exists('element_id', $data)) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getWorkflowActionIds() as $value) { - $values[] = $value; - } - $data['workflow_action_ids'] = $values; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OrderWorkflowActions::class => false]; } } diff --git a/generated/Normalizer/OrderWorkspacesNormalizer.php b/generated/Normalizer/OrderWorkspacesNormalizer.php index 63eeee3..d845e6c 100644 --- a/generated/Normalizer/OrderWorkspacesNormalizer.php +++ b/generated/Normalizer/OrderWorkspacesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class OrderWorkspacesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class OrderWorkspacesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\OrderWorkspaces(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('workspaces', $data)) { - $values = []; - foreach ($data['workspaces'] as $value) { - $values[] = $value; - } - $object->setWorkspaces($values); - unset($data['workspaces']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\OrderWorkspaces(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('workspaces', $data)) { $values = []; - foreach ($object->getWorkspaces() as $value) { + foreach ($data['workspaces'] as $value) { $values[] = $value; } - $data['workspaces'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setWorkspaces($values); + unset($data['workspaces']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => false]; - } + return $object; } -} else { - class OrderWorkspacesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getWorkspaces() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['workspaces'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\OrderWorkspaces(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('workspaces', $data)) { - $values = []; - foreach ($data['workspaces'] as $value) { - $values[] = $value; - } - $object->setWorkspaces($values); - unset($data['workspaces']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getWorkspaces() as $value) { - $values[] = $value; - } - $data['workspaces'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\OrderWorkspaces::class => false]; } } diff --git a/generated/Normalizer/PageNormalizer.php b/generated/Normalizer/PageNormalizer.php index cce4f51..0a687ac 100644 --- a/generated/Normalizer/PageNormalizer.php +++ b/generated/Normalizer/PageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Page::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Page::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Page::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Page::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Page(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Page(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; - } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('path', $data)) { + $object->setPath($data['path']); + unset($data['path']); + } + if (\array_key_exists('path_params', $data)) { + $values = []; + foreach ($data['path_params'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); } - - return $data; + $object->setPathParams($values); + unset($data['path_params']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Page::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class PageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Page::class === $type; + if (\array_key_exists('builder_id', $data)) { + $object->setBuilderId($data['builder_id']); + unset($data['builder_id']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Page::class === get_class($data); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Page(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['path'] = $data->getPath(); + if ($data->isInitialized('pathParams') && null !== $data->getPathParams()) { + $values = []; + foreach ($data->getPathParams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['path_params'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Page::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Page::class => false]; } } diff --git a/generated/Normalizer/PageParameterValueNormalizer.php b/generated/Normalizer/PageParameterValueNormalizer.php index 324d173..eed7200 100644 --- a/generated/Normalizer/PageParameterValueNormalizer.php +++ b/generated/Normalizer/PageParameterValueNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PageParameterValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PageParameterValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PageParameterValue::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PageParameterValue::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PageParameterValue::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PageParameterValue::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PageParameterValue(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PageParameterValue(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['value'] = $object->getValue(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PageParameterValue::class => false]; + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); } - } -} else { - class PageParameterValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PageParameterValue::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PageParameterValue::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PageParameterValue(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['value'] = $data->getValue(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['value'] = $object->getValue(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PageParameterValue::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PageParameterValue::class => false]; } } diff --git a/generated/Normalizer/PaginationRowResponseNormalizer.php b/generated/Normalizer/PaginationRowResponseNormalizer.php index 1b578a5..737b072 100644 --- a/generated/Normalizer/PaginationRowResponseNormalizer.php +++ b/generated/Normalizer/PaginationRowResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationRowResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowResponse::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => false]; - } + return $object; } -} else { - class PaginationRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationRowResponse::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerAuditLogNormalizer.php b/generated/Normalizer/PaginationSerializerAuditLogNormalizer.php index ca33b93..9e59ce0 100644 --- a/generated/Normalizer/PaginationSerializerAuditLogNormalizer.php +++ b/generated/Normalizer/PaginationSerializerAuditLogNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerAuditLogNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerAuditLogNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLog::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLog::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => false]; - } + return $object; } -} else { - class PaginationSerializerAuditLogNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLog::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLog::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerAuditLogUserNormalizer.php b/generated/Normalizer/PaginationSerializerAuditLogUserNormalizer.php index e85062f..d19d3b3 100644 --- a/generated/Normalizer/PaginationSerializerAuditLogUserNormalizer.php +++ b/generated/Normalizer/PaginationSerializerAuditLogUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerAuditLogUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerAuditLogUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLogUser::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLogUser::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => false]; - } + return $object; } -} else { - class PaginationSerializerAuditLogUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLogUser::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogUser::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerAuditLogWorkspaceNormalizer.php b/generated/Normalizer/PaginationSerializerAuditLogWorkspaceNormalizer.php index 6dcbf11..cb8761c 100644 --- a/generated/Normalizer/PaginationSerializerAuditLogWorkspaceNormalizer.php +++ b/generated/Normalizer/PaginationSerializerAuditLogWorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerAuditLogWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerAuditLogWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => false]; - } + return $object; } -} else { - class PaginationSerializerAuditLogWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\AuditLogWorkspace::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerAuditLogWorkspace::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerLicenseUserLookupNormalizer.php b/generated/Normalizer/PaginationSerializerLicenseUserLookupNormalizer.php index d8a6c58..405f4fc 100644 --- a/generated/Normalizer/PaginationSerializerLicenseUserLookupNormalizer.php +++ b/generated/Normalizer/PaginationSerializerLicenseUserLookupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerLicenseUserLookupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerLicenseUserLookupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => false]; - } + return $object; } -} else { - class PaginationSerializerLicenseUserLookupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LicenseUserLookup::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerLicenseUserLookup::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerLinkRowValueNormalizer.php b/generated/Normalizer/PaginationSerializerLinkRowValueNormalizer.php index aca4032..c1fb57d 100644 --- a/generated/Normalizer/PaginationSerializerLinkRowValueNormalizer.php +++ b/generated/Normalizer/PaginationSerializerLinkRowValueNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerLinkRowValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerLinkRowValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LinkRowValue::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LinkRowValue::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => false]; - } + return $object; } -} else { - class PaginationSerializerLinkRowValueNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LinkRowValue::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerLinkRowValue::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerNotificationRecipientNormalizer.php b/generated/Normalizer/PaginationSerializerNotificationRecipientNormalizer.php index a08c436..b18faef 100644 --- a/generated/Normalizer/PaginationSerializerNotificationRecipientNormalizer.php +++ b/generated/Normalizer/PaginationSerializerNotificationRecipientNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerNotificationRecipientNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerNotificationRecipientNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => false]; - } + return $object; } -} else { - class PaginationSerializerNotificationRecipientNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\NotificationRecipient::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerNotificationRecipient::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerRowCommentNormalizer.php b/generated/Normalizer/PaginationSerializerRowCommentNormalizer.php index 4f59c1d..30fe723 100644 --- a/generated/Normalizer/PaginationSerializerRowCommentNormalizer.php +++ b/generated/Normalizer/PaginationSerializerRowCommentNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerRowCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerRowCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowComment::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowComment::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => false]; - } + return $object; } -} else { - class PaginationSerializerRowCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowComment::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerRowComment::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerRowHistoryNormalizer.php b/generated/Normalizer/PaginationSerializerRowHistoryNormalizer.php index b1410dc..a1ec76a 100644 --- a/generated/Normalizer/PaginationSerializerRowHistoryNormalizer.php +++ b/generated/Normalizer/PaginationSerializerRowHistoryNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerRowHistoryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerRowHistoryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowHistory::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowHistory::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => false]; - } + return $object; } -} else { - class PaginationSerializerRowHistoryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\RowHistory::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerRowHistory::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerTrashContentsNormalizer.php b/generated/Normalizer/PaginationSerializerTrashContentsNormalizer.php index 05d2b20..b81c681 100644 --- a/generated/Normalizer/PaginationSerializerTrashContentsNormalizer.php +++ b/generated/Normalizer/PaginationSerializerTrashContentsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerTrashContentsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerTrashContentsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashContents::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashContents::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => false]; - } + return $object; } -} else { - class PaginationSerializerTrashContentsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashContents::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerTrashContents::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerUserAdminResponseNormalizer.php b/generated/Normalizer/PaginationSerializerUserAdminResponseNormalizer.php index 3b05fc6..995dc3c 100644 --- a/generated/Normalizer/PaginationSerializerUserAdminResponseNormalizer.php +++ b/generated/Normalizer/PaginationSerializerUserAdminResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerUserAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerUserAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => false]; - } + return $object; } -} else { - class PaginationSerializerUserAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerUserAdminResponse::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer.php b/generated/Normalizer/PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer.php index a001274..f75ca88 100644 --- a/generated/Normalizer/PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer.php +++ b/generated/Normalizer/PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,120 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - if (\array_key_exists('row_metadata', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['row_metadata'] as $key_1 => $value_1) { - $values_1[$key_1] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); - } - $object->setRowMetadata($values_1); - unset($data['row_metadata']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values_2 = []; - foreach ($data['results'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values_2); - unset($data['results']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('fieldOptions') && null !== $object->getFieldOptions()) { - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - } - if ($object->isInitialized('rowMetadata') && null !== $object->getRowMetadata()) { - $values_1 = []; - foreach ($object->getRowMetadata() as $key_1 => $value_1) { - $values_1[$key_1] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['row_metadata'] = $values_1; + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); } - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values_2 = []; - foreach ($object->getResults() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['results'] = $values_2; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $object->setFieldOptions($values); + unset($data['field_options']); + } + if (\array_key_exists('row_metadata', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['row_metadata'] as $key_1 => $value_1) { + $values_1[$key_1] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); } - - return $data; + $object->setRowMetadata($values_1); + unset($data['row_metadata']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false]; + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); } - } -} else { - class PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === $type; + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === get_class($data); + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - if (\array_key_exists('row_metadata', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['row_metadata'] as $key_1 => $value_1) { - $values_1[$key_1] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); - } - $object->setRowMetadata($values_1); - unset($data['row_metadata']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values_2 = []; - foreach ($data['results'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values_2); - unset($data['results']); + if (\array_key_exists('results', $data)) { + $values_2 = []; + foreach ($data['results'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } + $object->setResults($values_2); + unset($data['results']); + } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_3; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('fieldOptions') && null !== $object->getFieldOptions()) { - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - } - if ($object->isInitialized('rowMetadata') && null !== $object->getRowMetadata()) { - $values_1 = []; - foreach ($object->getRowMetadata() as $key_1 => $value_1) { - $values_1[$key_1] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['row_metadata'] = $values_1; + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('fieldOptions') && null !== $data->getFieldOptions()) { + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values_2 = []; - foreach ($object->getResults() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + $dataArray['field_options'] = $values; + } + if ($data->isInitialized('rowMetadata') && null !== $data->getRowMetadata()) { + $values_1 = []; + foreach ($data->getRowMetadata() as $key_1 => $value_1) { + $values_1[$key_1] = $this->normalizer->normalize($value_1, 'json', $context); } - $data['results'] = $values_2; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $dataArray['row_metadata'] = $values_1; + } + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values_2 = []; + foreach ($data->getResults() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $dataArray['results'] = $values_2; + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $dataArray[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer.php b/generated/Normalizer/PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer.php index 4f827eb..b45abe1 100644 --- a/generated/Normalizer/PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer.php +++ b/generated/Normalizer/PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,120 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - if (\array_key_exists('row_metadata', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['row_metadata'] as $key_1 => $value_1) { - $values_1[$key_1] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); - } - $object->setRowMetadata($values_1); - unset($data['row_metadata']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values_2 = []; - foreach ($data['results'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values_2); - unset($data['results']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('fieldOptions') && null !== $object->getFieldOptions()) { - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - } - if ($object->isInitialized('rowMetadata') && null !== $object->getRowMetadata()) { - $values_1 = []; - foreach ($object->getRowMetadata() as $key_1 => $value_1) { - $values_1[$key_1] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['row_metadata'] = $values_1; + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); } - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values_2 = []; - foreach ($object->getResults() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['results'] = $values_2; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $object->setFieldOptions($values); + unset($data['field_options']); + } + if (\array_key_exists('row_metadata', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['row_metadata'] as $key_1 => $value_1) { + $values_1[$key_1] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); } - - return $data; + $object->setRowMetadata($values_1); + unset($data['row_metadata']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false]; + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); } - } -} else { - class PaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === $type; + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === get_class($data); + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - if (\array_key_exists('row_metadata', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['row_metadata'] as $key_1 => $value_1) { - $values_1[$key_1] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\RowMetadata::class, 'json', $context); - } - $object->setRowMetadata($values_1); - unset($data['row_metadata']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values_2 = []; - foreach ($data['results'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values_2); - unset($data['results']); + if (\array_key_exists('results', $data)) { + $values_2 = []; + foreach ($data['results'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } + $object->setResults($values_2); + unset($data['results']); + } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_3; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('fieldOptions') && null !== $object->getFieldOptions()) { - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - } - if ($object->isInitialized('rowMetadata') && null !== $object->getRowMetadata()) { - $values_1 = []; - foreach ($object->getRowMetadata() as $key_1 => $value_1) { - $values_1[$key_1] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['row_metadata'] = $values_1; + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('fieldOptions') && null !== $data->getFieldOptions()) { + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); } - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values_2 = []; - foreach ($object->getResults() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + $dataArray['field_options'] = $values; + } + if ($data->isInitialized('rowMetadata') && null !== $data->getRowMetadata()) { + $values_1 = []; + foreach ($data->getRowMetadata() as $key_1 => $value_1) { + $values_1[$key_1] = $this->normalizer->normalize($value_1, 'json', $context); } - $data['results'] = $values_2; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $dataArray['row_metadata'] = $values_1; + } + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values_2 = []; + foreach ($data->getResults() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $dataArray['results'] = $values_2; + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $dataArray[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false]; } } diff --git a/generated/Normalizer/PaginationSerializerWorkspacesAdminResponseNormalizer.php b/generated/Normalizer/PaginationSerializerWorkspacesAdminResponseNormalizer.php index d13eaee..65c14ac 100644 --- a/generated/Normalizer/PaginationSerializerWorkspacesAdminResponseNormalizer.php +++ b/generated/Normalizer/PaginationSerializerWorkspacesAdminResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PaginationSerializerWorkspacesAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PaginationSerializerWorkspacesAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['results'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class, 'json', $context); } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setResults($values); + unset($data['results']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => false]; - } + return $object; } -} else { - class PaginationSerializerWorkspacesAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values = []; + foreach ($data->getResults() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values = []; - foreach ($data['results'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class, 'json', $context); - } - $object->setResults($values); - unset($data['results']); + $dataArray['results'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values = []; - foreach ($object->getResults() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['results'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PaginationSerializerWorkspacesAdminResponse::class => false]; } } diff --git a/generated/Normalizer/PasswordAuthProviderModelAuthProviderNormalizer.php b/generated/Normalizer/PasswordAuthProviderModelAuthProviderNormalizer.php index 7f64f31..0e0524b 100644 --- a/generated/Normalizer/PasswordAuthProviderModelAuthProviderNormalizer.php +++ b/generated/Normalizer/PasswordAuthProviderModelAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,163 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PasswordAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PasswordAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data)) { - $object->setDomain($data['domain']); - unset($data['domain']); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider(); + if (\array_key_exists('enabled', $data) && \is_int($data['enabled'])) { + $data['enabled'] = (bool) $data['enabled']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('domain', $data)) { + $object->setDomain($data['domain']); + unset($data['domain']); + } + if (\array_key_exists('enabled', $data)) { + $object->setEnabled($data['enabled']); + unset($data['enabled']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => false]; - } + return $object; } -} else { - class PasswordAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('domain') && null !== $data->getDomain()) { + $dataArray['domain'] = $data->getDomain(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class === get_class($data); + if ($data->isInitialized('enabled') && null !== $data->getEnabled()) { + $dataArray['enabled'] = $data->getEnabled(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data)) { - $object->setDomain($data['domain']); - unset($data['domain']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('domain') && null !== $object->getDomain()) { - $data['domain'] = $object->getDomain(); - } - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PasswordAuthProviderModelAuthProvider::class => false]; } } diff --git a/generated/Normalizer/PasswordFieldCreateFieldNormalizer.php b/generated/Normalizer/PasswordFieldCreateFieldNormalizer.php index 1b21b08..87d9626 100644 --- a/generated/Normalizer/PasswordFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/PasswordFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PasswordFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PasswordFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class PasswordFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PasswordFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/PasswordFieldFieldNormalizer.php b/generated/Normalizer/PasswordFieldFieldNormalizer.php index 8e78885..b27bb3f 100644 --- a/generated/Normalizer/PasswordFieldFieldNormalizer.php +++ b/generated/Normalizer/PasswordFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PasswordFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PasswordFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => false]; - } + return $object; } -} else { - class PasswordFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PasswordFieldField::class => false]; } } diff --git a/generated/Normalizer/PasswordFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/PasswordFieldFieldSerializerWithRelatedFieldsNormalizer.php index d9441c5..d3fa4a9 100644 --- a/generated/Normalizer/PasswordFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/PasswordFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PasswordFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PasswordFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class PasswordFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PasswordFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/PasswordFieldUpdateFieldNormalizer.php b/generated/Normalizer/PasswordFieldUpdateFieldNormalizer.php index ebe918e..6c4bb62 100644 --- a/generated/Normalizer/PasswordFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/PasswordFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PasswordFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PasswordFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => false]; - } + return $object; } -} else { - class PasswordFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PasswordFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/PatchRowRequestNormalizer.php b/generated/Normalizer/PatchRowRequestNormalizer.php index a4695ae..6bb0ba2 100644 --- a/generated/Normalizer/PatchRowRequestNormalizer.php +++ b/generated/Normalizer/PatchRowRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,119 +20,58 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchRowRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchRowRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => false]; - } + return $object; } -} else { - class PatchRowRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchRowRequest::class === get_class($data); - } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchRowRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchRowRequest::class => false]; } } diff --git a/generated/Normalizer/PatchRowsRequestNormalizer.php b/generated/Normalizer/PatchRowsRequestNormalizer.php index 709c891..36260fd 100644 --- a/generated/Normalizer/PatchRowsRequestNormalizer.php +++ b/generated/Normalizer/PatchRowsRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,149 +20,73 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchRowsRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchRowsRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchRowsRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class, 'json', $context); - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchRowsRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('items') && null !== $object->getItems()) { - $values = []; - foreach ($object->getItems() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['items'] = $values; + if (\array_key_exists('items', $data)) { + $values = []; + foreach ($data['items'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setItems($values); + unset($data['items']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => false]; - } + return $object; } -} else { - class PatchRowsRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class === get_class($data); - } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchRowsRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('items', $data)) { - $values = []; - foreach ($data['items'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\BatchUpdateRow::class, 'json', $context); - } - $object->setItems($values); - unset($data['items']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('items') && null !== $data->getItems()) { + $values = []; + foreach ($data->getItems() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - return $object; + $dataArray['items'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('items') && null !== $object->getItems()) { - $values = []; - foreach ($object->getItems() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['items'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchRowsRequest::class => false]; } } diff --git a/generated/Normalizer/PatchedAccountNormalizer.php b/generated/Normalizer/PatchedAccountNormalizer.php index 09217f6..64e6a5e 100644 --- a/generated/Normalizer/PatchedAccountNormalizer.php +++ b/generated/Normalizer/PatchedAccountNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,89 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedAccountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedAccountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedAccount::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedAccount::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedAccount::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedAccount::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedAccount(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - if (\array_key_exists('email_notification_frequency', $data)) { - $object->setEmailNotificationFrequency($data['email_notification_frequency']); - unset($data['email_notification_frequency']); - } - if (\array_key_exists('completed_onboarding', $data)) { - $object->setCompletedOnboarding($data['completed_onboarding']); - unset($data['completed_onboarding']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedAccount(); + if (\array_key_exists('completed_onboarding', $data) && \is_int($data['completed_onboarding'])) { + $data['completed_onboarding'] = (bool) $data['completed_onboarding']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - if ($object->isInitialized('emailNotificationFrequency') && null !== $object->getEmailNotificationFrequency()) { - $data['email_notification_frequency'] = $object->getEmailNotificationFrequency(); - } - if ($object->isInitialized('completedOnboarding') && null !== $object->getCompletedOnboarding()) { - $data['completed_onboarding'] = $object->getCompletedOnboarding(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + if (\array_key_exists('email_notification_frequency', $data)) { + $object->setEmailNotificationFrequency($data['email_notification_frequency']); + unset($data['email_notification_frequency']); + } + if (\array_key_exists('completed_onboarding', $data)) { + $object->setCompletedOnboarding($data['completed_onboarding']); + unset($data['completed_onboarding']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedAccount::class => false]; - } + return $object; } -} else { - class PatchedAccountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedAccount::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedAccount::class === get_class($data); + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedAccount(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - if (\array_key_exists('email_notification_frequency', $data)) { - $object->setEmailNotificationFrequency($data['email_notification_frequency']); - unset($data['email_notification_frequency']); - } - if (\array_key_exists('completed_onboarding', $data)) { - $object->setCompletedOnboarding($data['completed_onboarding']); - unset($data['completed_onboarding']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('emailNotificationFrequency') && null !== $data->getEmailNotificationFrequency()) { + $dataArray['email_notification_frequency'] = $data->getEmailNotificationFrequency(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - if ($object->isInitialized('emailNotificationFrequency') && null !== $object->getEmailNotificationFrequency()) { - $data['email_notification_frequency'] = $object->getEmailNotificationFrequency(); - } - if ($object->isInitialized('completedOnboarding') && null !== $object->getCompletedOnboarding()) { - $data['completed_onboarding'] = $object->getCompletedOnboarding(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('completedOnboarding') && null !== $data->getCompletedOnboarding()) { + $dataArray['completed_onboarding'] = $data->getCompletedOnboarding(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedAccount::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedAccount::class => false]; } } diff --git a/generated/Normalizer/PatchedCombinedThemeConfigBlocksNormalizer.php b/generated/Normalizer/PatchedCombinedThemeConfigBlocksNormalizer.php index b0a45cd..4832e6d 100644 --- a/generated/Normalizer/PatchedCombinedThemeConfigBlocksNormalizer.php +++ b/generated/Normalizer/PatchedCombinedThemeConfigBlocksNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,977 +20,487 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedCombinedThemeConfigBlocksNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedCombinedThemeConfigBlocksNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('primary_color', $data)) { - $object->setPrimaryColor($data['primary_color']); - unset($data['primary_color']); - } - if (\array_key_exists('secondary_color', $data)) { - $object->setSecondaryColor($data['secondary_color']); - unset($data['secondary_color']); - } - if (\array_key_exists('border_color', $data)) { - $object->setBorderColor($data['border_color']); - unset($data['border_color']); - } - if (\array_key_exists('main_success_color', $data)) { - $object->setMainSuccessColor($data['main_success_color']); - unset($data['main_success_color']); - } - if (\array_key_exists('main_warning_color', $data)) { - $object->setMainWarningColor($data['main_warning_color']); - unset($data['main_warning_color']); - } - if (\array_key_exists('main_error_color', $data)) { - $object->setMainErrorColor($data['main_error_color']); - unset($data['main_error_color']); - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { - $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); - unset($data['page_background_file']); - } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { - $object->setPageBackgroundFile(null); - } - if (\array_key_exists('page_background_color', $data)) { - $object->setPageBackgroundColor($data['page_background_color']); - unset($data['page_background_color']); - } - if (\array_key_exists('page_background_mode', $data)) { - $object->setPageBackgroundMode($data['page_background_mode']); - unset($data['page_background_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('primaryColor') && null !== $object->getPrimaryColor()) { - $data['primary_color'] = $object->getPrimaryColor(); - } - if ($object->isInitialized('secondaryColor') && null !== $object->getSecondaryColor()) { - $data['secondary_color'] = $object->getSecondaryColor(); - } - if ($object->isInitialized('borderColor') && null !== $object->getBorderColor()) { - $data['border_color'] = $object->getBorderColor(); - } - if ($object->isInitialized('mainSuccessColor') && null !== $object->getMainSuccessColor()) { - $data['main_success_color'] = $object->getMainSuccessColor(); - } - if ($object->isInitialized('mainWarningColor') && null !== $object->getMainWarningColor()) { - $data['main_warning_color'] = $object->getMainWarningColor(); - } - if ($object->isInitialized('mainErrorColor') && null !== $object->getMainErrorColor()) { - $data['main_error_color'] = $object->getMainErrorColor(); - } - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - if ($object->isInitialized('pageBackgroundFile') && null !== $object->getPageBackgroundFile()) { - $data['page_background_file'] = $this->normalizer->normalize($object->getPageBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('pageBackgroundColor') && null !== $object->getPageBackgroundColor()) { - $data['page_background_color'] = $object->getPageBackgroundColor(); - } - if ($object->isInitialized('pageBackgroundMode') && null !== $object->getPageBackgroundMode()) { - $data['page_background_mode'] = $object->getPageBackgroundMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('primary_color', $data)) { + $object->setPrimaryColor($data['primary_color']); + unset($data['primary_color']); + } + if (\array_key_exists('secondary_color', $data)) { + $object->setSecondaryColor($data['secondary_color']); + unset($data['secondary_color']); + } + if (\array_key_exists('border_color', $data)) { + $object->setBorderColor($data['border_color']); + unset($data['border_color']); + } + if (\array_key_exists('main_success_color', $data)) { + $object->setMainSuccessColor($data['main_success_color']); + unset($data['main_success_color']); + } + if (\array_key_exists('main_warning_color', $data)) { + $object->setMainWarningColor($data['main_warning_color']); + unset($data['main_warning_color']); + } + if (\array_key_exists('main_error_color', $data)) { + $object->setMainErrorColor($data['main_error_color']); + unset($data['main_error_color']); + } + if (\array_key_exists('body_font_family', $data)) { + $object->setBodyFontFamily($data['body_font_family']); + unset($data['body_font_family']); + } + if (\array_key_exists('body_font_size', $data)) { + $object->setBodyFontSize($data['body_font_size']); + unset($data['body_font_size']); + } + if (\array_key_exists('body_text_color', $data)) { + $object->setBodyTextColor($data['body_text_color']); + unset($data['body_text_color']); + } + if (\array_key_exists('body_text_alignment', $data)) { + $object->setBodyTextAlignment($data['body_text_alignment']); + unset($data['body_text_alignment']); + } + if (\array_key_exists('heading_1_font_family', $data)) { + $object->setHeading1FontFamily($data['heading_1_font_family']); + unset($data['heading_1_font_family']); + } + if (\array_key_exists('heading_1_font_size', $data)) { + $object->setHeading1FontSize($data['heading_1_font_size']); + unset($data['heading_1_font_size']); + } + if (\array_key_exists('heading_1_text_color', $data)) { + $object->setHeading1TextColor($data['heading_1_text_color']); + unset($data['heading_1_text_color']); + } + if (\array_key_exists('heading_1_text_alignment', $data)) { + $object->setHeading1TextAlignment($data['heading_1_text_alignment']); + unset($data['heading_1_text_alignment']); + } + if (\array_key_exists('heading_2_font_family', $data)) { + $object->setHeading2FontFamily($data['heading_2_font_family']); + unset($data['heading_2_font_family']); + } + if (\array_key_exists('heading_2_font_size', $data)) { + $object->setHeading2FontSize($data['heading_2_font_size']); + unset($data['heading_2_font_size']); + } + if (\array_key_exists('heading_2_text_color', $data)) { + $object->setHeading2TextColor($data['heading_2_text_color']); + unset($data['heading_2_text_color']); + } + if (\array_key_exists('heading_2_text_alignment', $data)) { + $object->setHeading2TextAlignment($data['heading_2_text_alignment']); + unset($data['heading_2_text_alignment']); + } + if (\array_key_exists('heading_3_font_family', $data)) { + $object->setHeading3FontFamily($data['heading_3_font_family']); + unset($data['heading_3_font_family']); + } + if (\array_key_exists('heading_3_font_size', $data)) { + $object->setHeading3FontSize($data['heading_3_font_size']); + unset($data['heading_3_font_size']); + } + if (\array_key_exists('heading_3_text_color', $data)) { + $object->setHeading3TextColor($data['heading_3_text_color']); + unset($data['heading_3_text_color']); + } + if (\array_key_exists('heading_3_text_alignment', $data)) { + $object->setHeading3TextAlignment($data['heading_3_text_alignment']); + unset($data['heading_3_text_alignment']); + } + if (\array_key_exists('heading_4_font_family', $data)) { + $object->setHeading4FontFamily($data['heading_4_font_family']); + unset($data['heading_4_font_family']); + } + if (\array_key_exists('heading_4_font_size', $data)) { + $object->setHeading4FontSize($data['heading_4_font_size']); + unset($data['heading_4_font_size']); + } + if (\array_key_exists('heading_4_text_color', $data)) { + $object->setHeading4TextColor($data['heading_4_text_color']); + unset($data['heading_4_text_color']); + } + if (\array_key_exists('heading_4_text_alignment', $data)) { + $object->setHeading4TextAlignment($data['heading_4_text_alignment']); + unset($data['heading_4_text_alignment']); + } + if (\array_key_exists('heading_5_font_family', $data)) { + $object->setHeading5FontFamily($data['heading_5_font_family']); + unset($data['heading_5_font_family']); + } + if (\array_key_exists('heading_5_font_size', $data)) { + $object->setHeading5FontSize($data['heading_5_font_size']); + unset($data['heading_5_font_size']); + } + if (\array_key_exists('heading_5_text_color', $data)) { + $object->setHeading5TextColor($data['heading_5_text_color']); + unset($data['heading_5_text_color']); + } + if (\array_key_exists('heading_5_text_alignment', $data)) { + $object->setHeading5TextAlignment($data['heading_5_text_alignment']); + unset($data['heading_5_text_alignment']); + } + if (\array_key_exists('heading_6_font_family', $data)) { + $object->setHeading6FontFamily($data['heading_6_font_family']); + unset($data['heading_6_font_family']); + } + if (\array_key_exists('heading_6_font_size', $data)) { + $object->setHeading6FontSize($data['heading_6_font_size']); + unset($data['heading_6_font_size']); + } + if (\array_key_exists('heading_6_text_color', $data)) { + $object->setHeading6TextColor($data['heading_6_text_color']); + unset($data['heading_6_text_color']); + } + if (\array_key_exists('heading_6_text_alignment', $data)) { + $object->setHeading6TextAlignment($data['heading_6_text_alignment']); + unset($data['heading_6_text_alignment']); + } + if (\array_key_exists('button_font_family', $data)) { + $object->setButtonFontFamily($data['button_font_family']); + unset($data['button_font_family']); + } + if (\array_key_exists('button_font_size', $data)) { + $object->setButtonFontSize($data['button_font_size']); + unset($data['button_font_size']); + } + if (\array_key_exists('button_alignment', $data)) { + $object->setButtonAlignment($data['button_alignment']); + unset($data['button_alignment']); + } + if (\array_key_exists('button_text_alignment', $data)) { + $object->setButtonTextAlignment($data['button_text_alignment']); + unset($data['button_text_alignment']); + } + if (\array_key_exists('button_width', $data)) { + $object->setButtonWidth($data['button_width']); + unset($data['button_width']); + } + if (\array_key_exists('button_background_color', $data)) { + $object->setButtonBackgroundColor($data['button_background_color']); + unset($data['button_background_color']); + } + if (\array_key_exists('button_text_color', $data)) { + $object->setButtonTextColor($data['button_text_color']); + unset($data['button_text_color']); + } + if (\array_key_exists('button_border_color', $data)) { + $object->setButtonBorderColor($data['button_border_color']); + unset($data['button_border_color']); + } + if (\array_key_exists('button_border_size', $data)) { + $object->setButtonBorderSize($data['button_border_size']); + unset($data['button_border_size']); + } + if (\array_key_exists('button_border_radius', $data)) { + $object->setButtonBorderRadius($data['button_border_radius']); + unset($data['button_border_radius']); + } + if (\array_key_exists('button_vertical_padding', $data)) { + $object->setButtonVerticalPadding($data['button_vertical_padding']); + unset($data['button_vertical_padding']); + } + if (\array_key_exists('button_horizontal_padding', $data)) { + $object->setButtonHorizontalPadding($data['button_horizontal_padding']); + unset($data['button_horizontal_padding']); + } + if (\array_key_exists('button_hover_background_color', $data)) { + $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); + unset($data['button_hover_background_color']); + } + if (\array_key_exists('button_hover_text_color', $data)) { + $object->setButtonHoverTextColor($data['button_hover_text_color']); + unset($data['button_hover_text_color']); + } + if (\array_key_exists('button_hover_border_color', $data)) { + $object->setButtonHoverBorderColor($data['button_hover_border_color']); + unset($data['button_hover_border_color']); + } + if (\array_key_exists('link_font_family', $data)) { + $object->setLinkFontFamily($data['link_font_family']); + unset($data['link_font_family']); + } + if (\array_key_exists('link_font_size', $data)) { + $object->setLinkFontSize($data['link_font_size']); + unset($data['link_font_size']); + } + if (\array_key_exists('link_text_alignment', $data)) { + $object->setLinkTextAlignment($data['link_text_alignment']); + unset($data['link_text_alignment']); + } + if (\array_key_exists('link_text_color', $data)) { + $object->setLinkTextColor($data['link_text_color']); + unset($data['link_text_color']); + } + if (\array_key_exists('link_hover_text_color', $data)) { + $object->setLinkHoverTextColor($data['link_hover_text_color']); + unset($data['link_hover_text_color']); + } + if (\array_key_exists('image_max_height', $data)) { + $object->setImageMaxHeight($data['image_max_height']); + unset($data['image_max_height']); + } + if (\array_key_exists('image_alignment', $data)) { + $object->setImageAlignment($data['image_alignment']); + unset($data['image_alignment']); + } + if (\array_key_exists('image_max_width', $data)) { + $object->setImageMaxWidth($data['image_max_width']); + unset($data['image_max_width']); + } + if (\array_key_exists('image_constraint', $data)) { + $object->setImageConstraint($data['image_constraint']); + unset($data['image_constraint']); + } + if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { + $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); + unset($data['page_background_file']); + } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { + $object->setPageBackgroundFile(null); + } + if (\array_key_exists('page_background_color', $data)) { + $object->setPageBackgroundColor($data['page_background_color']); + unset($data['page_background_color']); + } + if (\array_key_exists('page_background_mode', $data)) { + $object->setPageBackgroundMode($data['page_background_mode']); + unset($data['page_background_mode']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => false]; - } + return $object; } -} else { - class PatchedCombinedThemeConfigBlocksNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('primaryColor') && null !== $data->getPrimaryColor()) { + $dataArray['primary_color'] = $data->getPrimaryColor(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class === get_class($data); + if ($data->isInitialized('secondaryColor') && null !== $data->getSecondaryColor()) { + $dataArray['secondary_color'] = $data->getSecondaryColor(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('primary_color', $data)) { - $object->setPrimaryColor($data['primary_color']); - unset($data['primary_color']); - } - if (\array_key_exists('secondary_color', $data)) { - $object->setSecondaryColor($data['secondary_color']); - unset($data['secondary_color']); - } - if (\array_key_exists('border_color', $data)) { - $object->setBorderColor($data['border_color']); - unset($data['border_color']); - } - if (\array_key_exists('main_success_color', $data)) { - $object->setMainSuccessColor($data['main_success_color']); - unset($data['main_success_color']); - } - if (\array_key_exists('main_warning_color', $data)) { - $object->setMainWarningColor($data['main_warning_color']); - unset($data['main_warning_color']); - } - if (\array_key_exists('main_error_color', $data)) { - $object->setMainErrorColor($data['main_error_color']); - unset($data['main_error_color']); - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { - $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); - unset($data['page_background_file']); - } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { - $object->setPageBackgroundFile(null); - } - if (\array_key_exists('page_background_color', $data)) { - $object->setPageBackgroundColor($data['page_background_color']); - unset($data['page_background_color']); - } - if (\array_key_exists('page_background_mode', $data)) { - $object->setPageBackgroundMode($data['page_background_mode']); - unset($data['page_background_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('borderColor') && null !== $data->getBorderColor()) { + $dataArray['border_color'] = $data->getBorderColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('primaryColor') && null !== $object->getPrimaryColor()) { - $data['primary_color'] = $object->getPrimaryColor(); - } - if ($object->isInitialized('secondaryColor') && null !== $object->getSecondaryColor()) { - $data['secondary_color'] = $object->getSecondaryColor(); - } - if ($object->isInitialized('borderColor') && null !== $object->getBorderColor()) { - $data['border_color'] = $object->getBorderColor(); - } - if ($object->isInitialized('mainSuccessColor') && null !== $object->getMainSuccessColor()) { - $data['main_success_color'] = $object->getMainSuccessColor(); - } - if ($object->isInitialized('mainWarningColor') && null !== $object->getMainWarningColor()) { - $data['main_warning_color'] = $object->getMainWarningColor(); - } - if ($object->isInitialized('mainErrorColor') && null !== $object->getMainErrorColor()) { - $data['main_error_color'] = $object->getMainErrorColor(); - } - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - if ($object->isInitialized('pageBackgroundFile') && null !== $object->getPageBackgroundFile()) { - $data['page_background_file'] = $this->normalizer->normalize($object->getPageBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('pageBackgroundColor') && null !== $object->getPageBackgroundColor()) { - $data['page_background_color'] = $object->getPageBackgroundColor(); - } - if ($object->isInitialized('pageBackgroundMode') && null !== $object->getPageBackgroundMode()) { - $data['page_background_mode'] = $object->getPageBackgroundMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('mainSuccessColor') && null !== $data->getMainSuccessColor()) { + $dataArray['main_success_color'] = $data->getMainSuccessColor(); + } + if ($data->isInitialized('mainWarningColor') && null !== $data->getMainWarningColor()) { + $dataArray['main_warning_color'] = $data->getMainWarningColor(); + } + if ($data->isInitialized('mainErrorColor') && null !== $data->getMainErrorColor()) { + $dataArray['main_error_color'] = $data->getMainErrorColor(); + } + if ($data->isInitialized('bodyFontFamily') && null !== $data->getBodyFontFamily()) { + $dataArray['body_font_family'] = $data->getBodyFontFamily(); + } + if ($data->isInitialized('bodyFontSize') && null !== $data->getBodyFontSize()) { + $dataArray['body_font_size'] = $data->getBodyFontSize(); + } + if ($data->isInitialized('bodyTextColor') && null !== $data->getBodyTextColor()) { + $dataArray['body_text_color'] = $data->getBodyTextColor(); + } + if ($data->isInitialized('bodyTextAlignment') && null !== $data->getBodyTextAlignment()) { + $dataArray['body_text_alignment'] = $data->getBodyTextAlignment(); + } + if ($data->isInitialized('heading1FontFamily') && null !== $data->getHeading1FontFamily()) { + $dataArray['heading_1_font_family'] = $data->getHeading1FontFamily(); + } + if ($data->isInitialized('heading1FontSize') && null !== $data->getHeading1FontSize()) { + $dataArray['heading_1_font_size'] = $data->getHeading1FontSize(); + } + if ($data->isInitialized('heading1TextColor') && null !== $data->getHeading1TextColor()) { + $dataArray['heading_1_text_color'] = $data->getHeading1TextColor(); + } + if ($data->isInitialized('heading1TextAlignment') && null !== $data->getHeading1TextAlignment()) { + $dataArray['heading_1_text_alignment'] = $data->getHeading1TextAlignment(); + } + if ($data->isInitialized('heading2FontFamily') && null !== $data->getHeading2FontFamily()) { + $dataArray['heading_2_font_family'] = $data->getHeading2FontFamily(); + } + if ($data->isInitialized('heading2FontSize') && null !== $data->getHeading2FontSize()) { + $dataArray['heading_2_font_size'] = $data->getHeading2FontSize(); + } + if ($data->isInitialized('heading2TextColor') && null !== $data->getHeading2TextColor()) { + $dataArray['heading_2_text_color'] = $data->getHeading2TextColor(); + } + if ($data->isInitialized('heading2TextAlignment') && null !== $data->getHeading2TextAlignment()) { + $dataArray['heading_2_text_alignment'] = $data->getHeading2TextAlignment(); + } + if ($data->isInitialized('heading3FontFamily') && null !== $data->getHeading3FontFamily()) { + $dataArray['heading_3_font_family'] = $data->getHeading3FontFamily(); + } + if ($data->isInitialized('heading3FontSize') && null !== $data->getHeading3FontSize()) { + $dataArray['heading_3_font_size'] = $data->getHeading3FontSize(); + } + if ($data->isInitialized('heading3TextColor') && null !== $data->getHeading3TextColor()) { + $dataArray['heading_3_text_color'] = $data->getHeading3TextColor(); + } + if ($data->isInitialized('heading3TextAlignment') && null !== $data->getHeading3TextAlignment()) { + $dataArray['heading_3_text_alignment'] = $data->getHeading3TextAlignment(); + } + if ($data->isInitialized('heading4FontFamily') && null !== $data->getHeading4FontFamily()) { + $dataArray['heading_4_font_family'] = $data->getHeading4FontFamily(); + } + if ($data->isInitialized('heading4FontSize') && null !== $data->getHeading4FontSize()) { + $dataArray['heading_4_font_size'] = $data->getHeading4FontSize(); + } + if ($data->isInitialized('heading4TextColor') && null !== $data->getHeading4TextColor()) { + $dataArray['heading_4_text_color'] = $data->getHeading4TextColor(); + } + if ($data->isInitialized('heading4TextAlignment') && null !== $data->getHeading4TextAlignment()) { + $dataArray['heading_4_text_alignment'] = $data->getHeading4TextAlignment(); + } + if ($data->isInitialized('heading5FontFamily') && null !== $data->getHeading5FontFamily()) { + $dataArray['heading_5_font_family'] = $data->getHeading5FontFamily(); + } + if ($data->isInitialized('heading5FontSize') && null !== $data->getHeading5FontSize()) { + $dataArray['heading_5_font_size'] = $data->getHeading5FontSize(); + } + if ($data->isInitialized('heading5TextColor') && null !== $data->getHeading5TextColor()) { + $dataArray['heading_5_text_color'] = $data->getHeading5TextColor(); + } + if ($data->isInitialized('heading5TextAlignment') && null !== $data->getHeading5TextAlignment()) { + $dataArray['heading_5_text_alignment'] = $data->getHeading5TextAlignment(); + } + if ($data->isInitialized('heading6FontFamily') && null !== $data->getHeading6FontFamily()) { + $dataArray['heading_6_font_family'] = $data->getHeading6FontFamily(); + } + if ($data->isInitialized('heading6FontSize') && null !== $data->getHeading6FontSize()) { + $dataArray['heading_6_font_size'] = $data->getHeading6FontSize(); + } + if ($data->isInitialized('heading6TextColor') && null !== $data->getHeading6TextColor()) { + $dataArray['heading_6_text_color'] = $data->getHeading6TextColor(); + } + if ($data->isInitialized('heading6TextAlignment') && null !== $data->getHeading6TextAlignment()) { + $dataArray['heading_6_text_alignment'] = $data->getHeading6TextAlignment(); + } + if ($data->isInitialized('buttonFontFamily') && null !== $data->getButtonFontFamily()) { + $dataArray['button_font_family'] = $data->getButtonFontFamily(); + } + if ($data->isInitialized('buttonFontSize') && null !== $data->getButtonFontSize()) { + $dataArray['button_font_size'] = $data->getButtonFontSize(); + } + if ($data->isInitialized('buttonAlignment') && null !== $data->getButtonAlignment()) { + $dataArray['button_alignment'] = $data->getButtonAlignment(); + } + if ($data->isInitialized('buttonTextAlignment') && null !== $data->getButtonTextAlignment()) { + $dataArray['button_text_alignment'] = $data->getButtonTextAlignment(); + } + if ($data->isInitialized('buttonWidth') && null !== $data->getButtonWidth()) { + $dataArray['button_width'] = $data->getButtonWidth(); + } + if ($data->isInitialized('buttonBackgroundColor') && null !== $data->getButtonBackgroundColor()) { + $dataArray['button_background_color'] = $data->getButtonBackgroundColor(); + } + if ($data->isInitialized('buttonTextColor') && null !== $data->getButtonTextColor()) { + $dataArray['button_text_color'] = $data->getButtonTextColor(); + } + if ($data->isInitialized('buttonBorderColor') && null !== $data->getButtonBorderColor()) { + $dataArray['button_border_color'] = $data->getButtonBorderColor(); + } + if ($data->isInitialized('buttonBorderSize') && null !== $data->getButtonBorderSize()) { + $dataArray['button_border_size'] = $data->getButtonBorderSize(); + } + if ($data->isInitialized('buttonBorderRadius') && null !== $data->getButtonBorderRadius()) { + $dataArray['button_border_radius'] = $data->getButtonBorderRadius(); + } + if ($data->isInitialized('buttonVerticalPadding') && null !== $data->getButtonVerticalPadding()) { + $dataArray['button_vertical_padding'] = $data->getButtonVerticalPadding(); + } + if ($data->isInitialized('buttonHorizontalPadding') && null !== $data->getButtonHorizontalPadding()) { + $dataArray['button_horizontal_padding'] = $data->getButtonHorizontalPadding(); + } + if ($data->isInitialized('buttonHoverBackgroundColor') && null !== $data->getButtonHoverBackgroundColor()) { + $dataArray['button_hover_background_color'] = $data->getButtonHoverBackgroundColor(); + } + if ($data->isInitialized('buttonHoverTextColor') && null !== $data->getButtonHoverTextColor()) { + $dataArray['button_hover_text_color'] = $data->getButtonHoverTextColor(); + } + if ($data->isInitialized('buttonHoverBorderColor') && null !== $data->getButtonHoverBorderColor()) { + $dataArray['button_hover_border_color'] = $data->getButtonHoverBorderColor(); + } + if ($data->isInitialized('linkFontFamily') && null !== $data->getLinkFontFamily()) { + $dataArray['link_font_family'] = $data->getLinkFontFamily(); + } + if ($data->isInitialized('linkFontSize') && null !== $data->getLinkFontSize()) { + $dataArray['link_font_size'] = $data->getLinkFontSize(); + } + if ($data->isInitialized('linkTextAlignment') && null !== $data->getLinkTextAlignment()) { + $dataArray['link_text_alignment'] = $data->getLinkTextAlignment(); + } + if ($data->isInitialized('linkTextColor') && null !== $data->getLinkTextColor()) { + $dataArray['link_text_color'] = $data->getLinkTextColor(); + } + if ($data->isInitialized('linkHoverTextColor') && null !== $data->getLinkHoverTextColor()) { + $dataArray['link_hover_text_color'] = $data->getLinkHoverTextColor(); + } + if ($data->isInitialized('imageMaxHeight') && null !== $data->getImageMaxHeight()) { + $dataArray['image_max_height'] = $data->getImageMaxHeight(); + } + if ($data->isInitialized('imageAlignment') && null !== $data->getImageAlignment()) { + $dataArray['image_alignment'] = $data->getImageAlignment(); + } + if ($data->isInitialized('imageMaxWidth') && null !== $data->getImageMaxWidth()) { + $dataArray['image_max_width'] = $data->getImageMaxWidth(); + } + if ($data->isInitialized('imageConstraint') && null !== $data->getImageConstraint()) { + $dataArray['image_constraint'] = $data->getImageConstraint(); + } + if ($data->isInitialized('pageBackgroundFile') && null !== $data->getPageBackgroundFile()) { + $dataArray['page_background_file'] = $this->normalizer->normalize($data->getPageBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('pageBackgroundColor') && null !== $data->getPageBackgroundColor()) { + $dataArray['page_background_color'] = $data->getPageBackgroundColor(); + } + if ($data->isInitialized('pageBackgroundMode') && null !== $data->getPageBackgroundMode()) { + $dataArray['page_background_mode'] = $data->getPageBackgroundMode(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocks::class => false]; } } diff --git a/generated/Normalizer/PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer.php b/generated/Normalizer/PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer.php index 1c9af4d..8ce6894 100644 --- a/generated/Normalizer/PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer.php +++ b/generated/Normalizer/PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => false]; - } + return $object; } -} else { - class PatchedCombinedThemeConfigBlocksPageBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedCombinedThemeConfigBlocksPageBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/PatchedGenerativeAISettingsNormalizer.php b/generated/Normalizer/PatchedGenerativeAISettingsNormalizer.php index 40a1c9b..239df1b 100644 --- a/generated/Normalizer/PatchedGenerativeAISettingsNormalizer.php +++ b/generated/Normalizer/PatchedGenerativeAISettingsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedGenerativeAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedGenerativeAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('openai', $data)) { - $object->setOpenai($this->denormalizer->denormalize($data['openai'], \CedricZiel\Baserow\Generated\Model\OpenAISettings::class, 'json', $context)); - unset($data['openai']); - } - if (\array_key_exists('ollama', $data)) { - $object->setOllama($this->denormalizer->denormalize($data['ollama'], \CedricZiel\Baserow\Generated\Model\OllamaSettings::class, 'json', $context)); - unset($data['ollama']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('openai') && null !== $object->getOpenai()) { - $data['openai'] = $this->normalizer->normalize($object->getOpenai(), 'json', $context); - } - if ($object->isInitialized('ollama') && null !== $object->getOllama()) { - $data['ollama'] = $this->normalizer->normalize($object->getOllama(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('openai', $data)) { + $object->setOpenai($this->denormalizer->denormalize($data['openai'], \CedricZiel\Baserow\Generated\Model\OpenAISettings::class, 'json', $context)); + unset($data['openai']); + } + if (\array_key_exists('ollama', $data)) { + $object->setOllama($this->denormalizer->denormalize($data['ollama'], \CedricZiel\Baserow\Generated\Model\OllamaSettings::class, 'json', $context)); + unset($data['ollama']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => false]; - } + return $object; } -} else { - class PatchedGenerativeAISettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('openai') && null !== $data->getOpenai()) { + $dataArray['openai'] = $this->normalizer->normalize($data->getOpenai(), 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class === get_class($data); + if ($data->isInitialized('ollama') && null !== $data->getOllama()) { + $dataArray['ollama'] = $this->normalizer->normalize($data->getOllama(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('openai', $data)) { - $object->setOpenai($this->denormalizer->denormalize($data['openai'], \CedricZiel\Baserow\Generated\Model\OpenAISettings::class, 'json', $context)); - unset($data['openai']); - } - if (\array_key_exists('ollama', $data)) { - $object->setOllama($this->denormalizer->denormalize($data['ollama'], \CedricZiel\Baserow\Generated\Model\OllamaSettings::class, 'json', $context)); - unset($data['ollama']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('openai') && null !== $object->getOpenai()) { - $data['openai'] = $this->normalizer->normalize($object->getOpenai(), 'json', $context); - } - if ($object->isInitialized('ollama') && null !== $object->getOllama()) { - $data['ollama'] = $this->normalizer->normalize($object->getOllama(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedGenerativeAISettings::class => false]; } } diff --git a/generated/Normalizer/PatchedMoveDataSourceNormalizer.php b/generated/Normalizer/PatchedMoveDataSourceNormalizer.php index 24adbfc..470ce9d 100644 --- a/generated/Normalizer/PatchedMoveDataSourceNormalizer.php +++ b/generated/Normalizer/PatchedMoveDataSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedMoveDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedMoveDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { - $object->setBeforeId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { + $object->setBeforeId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => false]; - } + return $object; } -} else { - class PatchedMoveDataSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { - $object->setBeforeId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedMoveDataSource::class => false]; } } diff --git a/generated/Normalizer/PatchedMoveElementNormalizer.php b/generated/Normalizer/PatchedMoveElementNormalizer.php index e6e5628..a932f9a 100644 --- a/generated/Normalizer/PatchedMoveElementNormalizer.php +++ b/generated/Normalizer/PatchedMoveElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,173 +20,85 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedMoveElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedMoveElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { - $object->setBeforeId(null); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { + $object->setBeforeId(null); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => false]; - } + return $object; } -} else { - class PatchedMoveElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class === get_class($data); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { - $object->setBeforeId(null); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedMoveElement::class => false]; } } diff --git a/generated/Normalizer/PatchedMoveIntegrationNormalizer.php b/generated/Normalizer/PatchedMoveIntegrationNormalizer.php index d4066d1..62efa7f 100644 --- a/generated/Normalizer/PatchedMoveIntegrationNormalizer.php +++ b/generated/Normalizer/PatchedMoveIntegrationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedMoveIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedMoveIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { - $object->setBeforeId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { + $object->setBeforeId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => false]; - } + return $object; } -} else { - class PatchedMoveIntegrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { - $object->setBeforeId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedMoveIntegration::class => false]; } } diff --git a/generated/Normalizer/PatchedMoveUserSourceNormalizer.php b/generated/Normalizer/PatchedMoveUserSourceNormalizer.php index 813a22b..146997a 100644 --- a/generated/Normalizer/PatchedMoveUserSourceNormalizer.php +++ b/generated/Normalizer/PatchedMoveUserSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,137 +20,67 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedMoveUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedMoveUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { - $object->setBeforeId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { + $object->setBeforeId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => false]; - } + return $object; } -} else { - class PatchedMoveUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('before_id', $data) && null !== $data['before_id']) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } elseif (\array_key_exists('before_id', $data) && null === $data['before_id']) { - $object->setBeforeId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedMoveUserSource::class => false]; } } diff --git a/generated/Normalizer/PatchedSettingsCoBrandingLogoNormalizer.php b/generated/Normalizer/PatchedSettingsCoBrandingLogoNormalizer.php index 9c030ca..810deca 100644 --- a/generated/Normalizer/PatchedSettingsCoBrandingLogoNormalizer.php +++ b/generated/Normalizer/PatchedSettingsCoBrandingLogoNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedSettingsCoBrandingLogoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedSettingsCoBrandingLogoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => false]; - } + return $object; } -} else { - class PatchedSettingsCoBrandingLogoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class => false]; } } diff --git a/generated/Normalizer/PatchedSettingsNormalizer.php b/generated/Normalizer/PatchedSettingsNormalizer.php index 045ab04..61e46fd 100644 --- a/generated/Normalizer/PatchedSettingsNormalizer.php +++ b/generated/Normalizer/PatchedSettingsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,295 +20,173 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedSettings::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedSettings::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedSettings::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedSettings::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedSettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('allow_new_signups', $data)) { - $object->setAllowNewSignups($data['allow_new_signups']); - unset($data['allow_new_signups']); - } - if (\array_key_exists('allow_signups_via_workspace_invitations', $data)) { - $object->setAllowSignupsViaWorkspaceInvitations($data['allow_signups_via_workspace_invitations']); - unset($data['allow_signups_via_workspace_invitations']); - } - if (\array_key_exists('allow_signups_via_group_invitations', $data)) { - $object->setAllowSignupsViaGroupInvitations($data['allow_signups_via_group_invitations']); - unset($data['allow_signups_via_group_invitations']); - } - if (\array_key_exists('allow_reset_password', $data)) { - $object->setAllowResetPassword($data['allow_reset_password']); - unset($data['allow_reset_password']); - } - if (\array_key_exists('allow_global_workspace_creation', $data)) { - $object->setAllowGlobalWorkspaceCreation($data['allow_global_workspace_creation']); - unset($data['allow_global_workspace_creation']); - } - if (\array_key_exists('allow_global_group_creation', $data)) { - $object->setAllowGlobalGroupCreation($data['allow_global_group_creation']); - unset($data['allow_global_group_creation']); - } - if (\array_key_exists('account_deletion_grace_delay', $data)) { - $object->setAccountDeletionGraceDelay($data['account_deletion_grace_delay']); - unset($data['account_deletion_grace_delay']); - } - if (\array_key_exists('show_admin_signup_page', $data)) { - $object->setShowAdminSignupPage($data['show_admin_signup_page']); - unset($data['show_admin_signup_page']); - } - if (\array_key_exists('track_workspace_usage', $data)) { - $object->setTrackWorkspaceUsage($data['track_workspace_usage']); - unset($data['track_workspace_usage']); - } - if (\array_key_exists('show_baserow_help_request', $data)) { - $object->setShowBaserowHelpRequest($data['show_baserow_help_request']); - unset($data['show_baserow_help_request']); - } - if (\array_key_exists('co_branding_logo', $data) && null !== $data['co_branding_logo']) { - $object->setCoBrandingLogo($this->denormalizer->denormalize($data['co_branding_logo'], \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class, 'json', $context)); - unset($data['co_branding_logo']); - } elseif (\array_key_exists('co_branding_logo', $data) && null === $data['co_branding_logo']) { - $object->setCoBrandingLogo(null); - } - if (\array_key_exists('email_verification', $data) && null !== $data['email_verification']) { - $object->setEmailVerification($data['email_verification']); - unset($data['email_verification']); - } elseif (\array_key_exists('email_verification', $data) && null === $data['email_verification']) { - $object->setEmailVerification(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedSettings(); + if (\array_key_exists('allow_new_signups', $data) && \is_int($data['allow_new_signups'])) { + $data['allow_new_signups'] = (bool) $data['allow_new_signups']; + } + if (\array_key_exists('allow_signups_via_workspace_invitations', $data) && \is_int($data['allow_signups_via_workspace_invitations'])) { + $data['allow_signups_via_workspace_invitations'] = (bool) $data['allow_signups_via_workspace_invitations']; + } + if (\array_key_exists('allow_signups_via_group_invitations', $data) && \is_int($data['allow_signups_via_group_invitations'])) { + $data['allow_signups_via_group_invitations'] = (bool) $data['allow_signups_via_group_invitations']; + } + if (\array_key_exists('allow_reset_password', $data) && \is_int($data['allow_reset_password'])) { + $data['allow_reset_password'] = (bool) $data['allow_reset_password']; + } + if (\array_key_exists('allow_global_workspace_creation', $data) && \is_int($data['allow_global_workspace_creation'])) { + $data['allow_global_workspace_creation'] = (bool) $data['allow_global_workspace_creation']; + } + if (\array_key_exists('allow_global_group_creation', $data) && \is_int($data['allow_global_group_creation'])) { + $data['allow_global_group_creation'] = (bool) $data['allow_global_group_creation']; + } + if (\array_key_exists('show_admin_signup_page', $data) && \is_int($data['show_admin_signup_page'])) { + $data['show_admin_signup_page'] = (bool) $data['show_admin_signup_page']; + } + if (\array_key_exists('track_workspace_usage', $data) && \is_int($data['track_workspace_usage'])) { + $data['track_workspace_usage'] = (bool) $data['track_workspace_usage']; + } + if (\array_key_exists('show_baserow_help_request', $data) && \is_int($data['show_baserow_help_request'])) { + $data['show_baserow_help_request'] = (bool) $data['show_baserow_help_request']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('allowNewSignups') && null !== $object->getAllowNewSignups()) { - $data['allow_new_signups'] = $object->getAllowNewSignups(); - } - if ($object->isInitialized('allowSignupsViaWorkspaceInvitations') && null !== $object->getAllowSignupsViaWorkspaceInvitations()) { - $data['allow_signups_via_workspace_invitations'] = $object->getAllowSignupsViaWorkspaceInvitations(); - } - if ($object->isInitialized('allowSignupsViaGroupInvitations') && null !== $object->getAllowSignupsViaGroupInvitations()) { - $data['allow_signups_via_group_invitations'] = $object->getAllowSignupsViaGroupInvitations(); - } - if ($object->isInitialized('allowResetPassword') && null !== $object->getAllowResetPassword()) { - $data['allow_reset_password'] = $object->getAllowResetPassword(); - } - if ($object->isInitialized('allowGlobalWorkspaceCreation') && null !== $object->getAllowGlobalWorkspaceCreation()) { - $data['allow_global_workspace_creation'] = $object->getAllowGlobalWorkspaceCreation(); - } - if ($object->isInitialized('allowGlobalGroupCreation') && null !== $object->getAllowGlobalGroupCreation()) { - $data['allow_global_group_creation'] = $object->getAllowGlobalGroupCreation(); - } - if ($object->isInitialized('accountDeletionGraceDelay') && null !== $object->getAccountDeletionGraceDelay()) { - $data['account_deletion_grace_delay'] = $object->getAccountDeletionGraceDelay(); - } - if ($object->isInitialized('showAdminSignupPage') && null !== $object->getShowAdminSignupPage()) { - $data['show_admin_signup_page'] = $object->getShowAdminSignupPage(); - } - if ($object->isInitialized('trackWorkspaceUsage') && null !== $object->getTrackWorkspaceUsage()) { - $data['track_workspace_usage'] = $object->getTrackWorkspaceUsage(); - } - if ($object->isInitialized('showBaserowHelpRequest') && null !== $object->getShowBaserowHelpRequest()) { - $data['show_baserow_help_request'] = $object->getShowBaserowHelpRequest(); - } - if ($object->isInitialized('coBrandingLogo') && null !== $object->getCoBrandingLogo()) { - $data['co_branding_logo'] = $this->normalizer->normalize($object->getCoBrandingLogo(), 'json', $context); - } - if ($object->isInitialized('emailVerification') && null !== $object->getEmailVerification()) { - $data['email_verification'] = $object->getEmailVerification(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('allow_new_signups', $data)) { + $object->setAllowNewSignups($data['allow_new_signups']); + unset($data['allow_new_signups']); + } + if (\array_key_exists('allow_signups_via_workspace_invitations', $data)) { + $object->setAllowSignupsViaWorkspaceInvitations($data['allow_signups_via_workspace_invitations']); + unset($data['allow_signups_via_workspace_invitations']); + } + if (\array_key_exists('allow_signups_via_group_invitations', $data)) { + $object->setAllowSignupsViaGroupInvitations($data['allow_signups_via_group_invitations']); + unset($data['allow_signups_via_group_invitations']); + } + if (\array_key_exists('allow_reset_password', $data)) { + $object->setAllowResetPassword($data['allow_reset_password']); + unset($data['allow_reset_password']); + } + if (\array_key_exists('allow_global_workspace_creation', $data)) { + $object->setAllowGlobalWorkspaceCreation($data['allow_global_workspace_creation']); + unset($data['allow_global_workspace_creation']); + } + if (\array_key_exists('allow_global_group_creation', $data)) { + $object->setAllowGlobalGroupCreation($data['allow_global_group_creation']); + unset($data['allow_global_group_creation']); + } + if (\array_key_exists('account_deletion_grace_delay', $data)) { + $object->setAccountDeletionGraceDelay($data['account_deletion_grace_delay']); + unset($data['account_deletion_grace_delay']); + } + if (\array_key_exists('show_admin_signup_page', $data)) { + $object->setShowAdminSignupPage($data['show_admin_signup_page']); + unset($data['show_admin_signup_page']); + } + if (\array_key_exists('track_workspace_usage', $data)) { + $object->setTrackWorkspaceUsage($data['track_workspace_usage']); + unset($data['track_workspace_usage']); + } + if (\array_key_exists('show_baserow_help_request', $data)) { + $object->setShowBaserowHelpRequest($data['show_baserow_help_request']); + unset($data['show_baserow_help_request']); + } + if (\array_key_exists('co_branding_logo', $data) && null !== $data['co_branding_logo']) { + $object->setCoBrandingLogo($this->denormalizer->denormalize($data['co_branding_logo'], \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class, 'json', $context)); + unset($data['co_branding_logo']); + } elseif (\array_key_exists('co_branding_logo', $data) && null === $data['co_branding_logo']) { + $object->setCoBrandingLogo(null); + } + if (\array_key_exists('email_verification', $data) && null !== $data['email_verification']) { + $object->setEmailVerification($data['email_verification']); + unset($data['email_verification']); + } elseif (\array_key_exists('email_verification', $data) && null === $data['email_verification']) { + $object->setEmailVerification(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedSettings::class => false]; - } + return $object; } -} else { - class PatchedSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedSettings::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('allowNewSignups') && null !== $data->getAllowNewSignups()) { + $dataArray['allow_new_signups'] = $data->getAllowNewSignups(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedSettings::class === get_class($data); + if ($data->isInitialized('allowSignupsViaWorkspaceInvitations') && null !== $data->getAllowSignupsViaWorkspaceInvitations()) { + $dataArray['allow_signups_via_workspace_invitations'] = $data->getAllowSignupsViaWorkspaceInvitations(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedSettings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('allow_new_signups', $data)) { - $object->setAllowNewSignups($data['allow_new_signups']); - unset($data['allow_new_signups']); - } - if (\array_key_exists('allow_signups_via_workspace_invitations', $data)) { - $object->setAllowSignupsViaWorkspaceInvitations($data['allow_signups_via_workspace_invitations']); - unset($data['allow_signups_via_workspace_invitations']); - } - if (\array_key_exists('allow_signups_via_group_invitations', $data)) { - $object->setAllowSignupsViaGroupInvitations($data['allow_signups_via_group_invitations']); - unset($data['allow_signups_via_group_invitations']); - } - if (\array_key_exists('allow_reset_password', $data)) { - $object->setAllowResetPassword($data['allow_reset_password']); - unset($data['allow_reset_password']); - } - if (\array_key_exists('allow_global_workspace_creation', $data)) { - $object->setAllowGlobalWorkspaceCreation($data['allow_global_workspace_creation']); - unset($data['allow_global_workspace_creation']); - } - if (\array_key_exists('allow_global_group_creation', $data)) { - $object->setAllowGlobalGroupCreation($data['allow_global_group_creation']); - unset($data['allow_global_group_creation']); - } - if (\array_key_exists('account_deletion_grace_delay', $data)) { - $object->setAccountDeletionGraceDelay($data['account_deletion_grace_delay']); - unset($data['account_deletion_grace_delay']); - } - if (\array_key_exists('show_admin_signup_page', $data)) { - $object->setShowAdminSignupPage($data['show_admin_signup_page']); - unset($data['show_admin_signup_page']); - } - if (\array_key_exists('track_workspace_usage', $data)) { - $object->setTrackWorkspaceUsage($data['track_workspace_usage']); - unset($data['track_workspace_usage']); - } - if (\array_key_exists('show_baserow_help_request', $data)) { - $object->setShowBaserowHelpRequest($data['show_baserow_help_request']); - unset($data['show_baserow_help_request']); - } - if (\array_key_exists('co_branding_logo', $data) && null !== $data['co_branding_logo']) { - $object->setCoBrandingLogo($this->denormalizer->denormalize($data['co_branding_logo'], \CedricZiel\Baserow\Generated\Model\PatchedSettingsCoBrandingLogo::class, 'json', $context)); - unset($data['co_branding_logo']); - } elseif (\array_key_exists('co_branding_logo', $data) && null === $data['co_branding_logo']) { - $object->setCoBrandingLogo(null); - } - if (\array_key_exists('email_verification', $data) && null !== $data['email_verification']) { - $object->setEmailVerification($data['email_verification']); - unset($data['email_verification']); - } elseif (\array_key_exists('email_verification', $data) && null === $data['email_verification']) { - $object->setEmailVerification(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('allowSignupsViaGroupInvitations') && null !== $data->getAllowSignupsViaGroupInvitations()) { + $dataArray['allow_signups_via_group_invitations'] = $data->getAllowSignupsViaGroupInvitations(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('allowNewSignups') && null !== $object->getAllowNewSignups()) { - $data['allow_new_signups'] = $object->getAllowNewSignups(); - } - if ($object->isInitialized('allowSignupsViaWorkspaceInvitations') && null !== $object->getAllowSignupsViaWorkspaceInvitations()) { - $data['allow_signups_via_workspace_invitations'] = $object->getAllowSignupsViaWorkspaceInvitations(); - } - if ($object->isInitialized('allowSignupsViaGroupInvitations') && null !== $object->getAllowSignupsViaGroupInvitations()) { - $data['allow_signups_via_group_invitations'] = $object->getAllowSignupsViaGroupInvitations(); - } - if ($object->isInitialized('allowResetPassword') && null !== $object->getAllowResetPassword()) { - $data['allow_reset_password'] = $object->getAllowResetPassword(); - } - if ($object->isInitialized('allowGlobalWorkspaceCreation') && null !== $object->getAllowGlobalWorkspaceCreation()) { - $data['allow_global_workspace_creation'] = $object->getAllowGlobalWorkspaceCreation(); - } - if ($object->isInitialized('allowGlobalGroupCreation') && null !== $object->getAllowGlobalGroupCreation()) { - $data['allow_global_group_creation'] = $object->getAllowGlobalGroupCreation(); - } - if ($object->isInitialized('accountDeletionGraceDelay') && null !== $object->getAccountDeletionGraceDelay()) { - $data['account_deletion_grace_delay'] = $object->getAccountDeletionGraceDelay(); - } - if ($object->isInitialized('showAdminSignupPage') && null !== $object->getShowAdminSignupPage()) { - $data['show_admin_signup_page'] = $object->getShowAdminSignupPage(); - } - if ($object->isInitialized('trackWorkspaceUsage') && null !== $object->getTrackWorkspaceUsage()) { - $data['track_workspace_usage'] = $object->getTrackWorkspaceUsage(); - } - if ($object->isInitialized('showBaserowHelpRequest') && null !== $object->getShowBaserowHelpRequest()) { - $data['show_baserow_help_request'] = $object->getShowBaserowHelpRequest(); - } - if ($object->isInitialized('coBrandingLogo') && null !== $object->getCoBrandingLogo()) { - $data['co_branding_logo'] = $this->normalizer->normalize($object->getCoBrandingLogo(), 'json', $context); - } - if ($object->isInitialized('emailVerification') && null !== $object->getEmailVerification()) { - $data['email_verification'] = $object->getEmailVerification(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('allowResetPassword') && null !== $data->getAllowResetPassword()) { + $dataArray['allow_reset_password'] = $data->getAllowResetPassword(); + } + if ($data->isInitialized('allowGlobalWorkspaceCreation') && null !== $data->getAllowGlobalWorkspaceCreation()) { + $dataArray['allow_global_workspace_creation'] = $data->getAllowGlobalWorkspaceCreation(); + } + if ($data->isInitialized('allowGlobalGroupCreation') && null !== $data->getAllowGlobalGroupCreation()) { + $dataArray['allow_global_group_creation'] = $data->getAllowGlobalGroupCreation(); + } + if ($data->isInitialized('accountDeletionGraceDelay') && null !== $data->getAccountDeletionGraceDelay()) { + $dataArray['account_deletion_grace_delay'] = $data->getAccountDeletionGraceDelay(); + } + if ($data->isInitialized('showAdminSignupPage') && null !== $data->getShowAdminSignupPage()) { + $dataArray['show_admin_signup_page'] = $data->getShowAdminSignupPage(); + } + if ($data->isInitialized('trackWorkspaceUsage') && null !== $data->getTrackWorkspaceUsage()) { + $dataArray['track_workspace_usage'] = $data->getTrackWorkspaceUsage(); + } + if ($data->isInitialized('showBaserowHelpRequest') && null !== $data->getShowBaserowHelpRequest()) { + $dataArray['show_baserow_help_request'] = $data->getShowBaserowHelpRequest(); + } + if ($data->isInitialized('coBrandingLogo') && null !== $data->getCoBrandingLogo()) { + $dataArray['co_branding_logo'] = $this->normalizer->normalize($data->getCoBrandingLogo(), 'json', $context); + } + if ($data->isInitialized('emailVerification') && null !== $data->getEmailVerification()) { + $dataArray['email_verification'] = $data->getEmailVerification(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedSettings::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedSettings::class => false]; } } diff --git a/generated/Normalizer/PatchedTableUpdateNormalizer.php b/generated/Normalizer/PatchedTableUpdateNormalizer.php index 1d22b10..398dd2a 100644 --- a/generated/Normalizer/PatchedTableUpdateNormalizer.php +++ b/generated/Normalizer/PatchedTableUpdateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedTableUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedTableUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => false]; - } + return $object; } -} else { - class PatchedTableUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTableUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedTableUpdate::class => false]; } } diff --git a/generated/Normalizer/PatchedTableWebhookUpdateRequestNormalizer.php b/generated/Normalizer/PatchedTableWebhookUpdateRequestNormalizer.php index ca3a098..cbe8bb2 100644 --- a/generated/Normalizer/PatchedTableWebhookUpdateRequestNormalizer.php +++ b/generated/Normalizer/PatchedTableWebhookUpdateRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,263 +20,139 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedTableWebhookUpdateRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedTableWebhookUpdateRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('include_all_events', $data)) { - $object->setIncludeAllEvents($data['include_all_events']); - unset($data['include_all_events']); - } - if (\array_key_exists('events', $data)) { - $values = []; - foreach ($data['events'] as $value) { - $values[] = $value; - } - $object->setEvents($values); - unset($data['events']); - } - if (\array_key_exists('request_method', $data)) { - $object->setRequestMethod($data['request_method']); - unset($data['request_method']); - } - if (\array_key_exists('headers', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['headers'] as $key => $value_1) { - $values_1[$key] = $value_1; - } - $object->setHeaders($values_1); - unset($data['headers']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('active', $data)) { - $object->setActive($data['active']); - unset($data['active']); - } - if (\array_key_exists('use_user_field_names', $data)) { - $object->setUseUserFieldNames($data['use_user_field_names']); - unset($data['use_user_field_names']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest(); + if (\array_key_exists('include_all_events', $data) && \is_int($data['include_all_events'])) { + $data['include_all_events'] = (bool) $data['include_all_events']; + } + if (\array_key_exists('active', $data) && \is_int($data['active'])) { + $data['active'] = (bool) $data['active']; + } + if (\array_key_exists('use_user_field_names', $data) && \is_int($data['use_user_field_names'])) { + $data['use_user_field_names'] = (bool) $data['use_user_field_names']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('includeAllEvents') && null !== $object->getIncludeAllEvents()) { - $data['include_all_events'] = $object->getIncludeAllEvents(); - } - if ($object->isInitialized('events') && null !== $object->getEvents()) { - $values = []; - foreach ($object->getEvents() as $value) { - $values[] = $value; - } - $data['events'] = $values; - } - if ($object->isInitialized('requestMethod') && null !== $object->getRequestMethod()) { - $data['request_method'] = $object->getRequestMethod(); - } - if ($object->isInitialized('headers') && null !== $object->getHeaders()) { - $values_1 = []; - foreach ($object->getHeaders() as $key => $value_1) { - $values_1[$key] = $value_1; - } - $data['headers'] = $values_1; - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('active') && null !== $object->getActive()) { - $data['active'] = $object->getActive(); + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('include_all_events', $data)) { + $object->setIncludeAllEvents($data['include_all_events']); + unset($data['include_all_events']); + } + if (\array_key_exists('events', $data)) { + $values = []; + foreach ($data['events'] as $value) { + $values[] = $value; } - if ($object->isInitialized('useUserFieldNames') && null !== $object->getUseUserFieldNames()) { - $data['use_user_field_names'] = $object->getUseUserFieldNames(); + $object->setEvents($values); + unset($data['events']); + } + if (\array_key_exists('request_method', $data)) { + $object->setRequestMethod($data['request_method']); + unset($data['request_method']); + } + if (\array_key_exists('headers', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['headers'] as $key => $value_1) { + $values_1[$key] = $value_1; } - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } + $object->setHeaders($values_1); + unset($data['headers']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('active', $data)) { + $object->setActive($data['active']); + unset($data['active']); + } + if (\array_key_exists('use_user_field_names', $data)) { + $object->setUseUserFieldNames($data['use_user_field_names']); + unset($data['use_user_field_names']); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => false]; - } + return $object; } -} else { - class PatchedTableWebhookUpdateRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('url') && null !== $data->getUrl()) { + $dataArray['url'] = $data->getUrl(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class === get_class($data); + if ($data->isInitialized('includeAllEvents') && null !== $data->getIncludeAllEvents()) { + $dataArray['include_all_events'] = $data->getIncludeAllEvents(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); + if ($data->isInitialized('events') && null !== $data->getEvents()) { + $values = []; + foreach ($data->getEvents() as $value) { + $values[] = $value; } - if (\array_key_exists('include_all_events', $data)) { - $object->setIncludeAllEvents($data['include_all_events']); - unset($data['include_all_events']); - } - if (\array_key_exists('events', $data)) { - $values = []; - foreach ($data['events'] as $value) { - $values[] = $value; - } - $object->setEvents($values); - unset($data['events']); - } - if (\array_key_exists('request_method', $data)) { - $object->setRequestMethod($data['request_method']); - unset($data['request_method']); - } - if (\array_key_exists('headers', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['headers'] as $key => $value_1) { - $values_1[$key] = $value_1; - } - $object->setHeaders($values_1); - unset($data['headers']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('active', $data)) { - $object->setActive($data['active']); - unset($data['active']); - } - if (\array_key_exists('use_user_field_names', $data)) { - $object->setUseUserFieldNames($data['use_user_field_names']); - unset($data['use_user_field_names']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - - return $object; + $dataArray['events'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('url') && null !== $object->getUrl()) { - $data['url'] = $object->getUrl(); - } - if ($object->isInitialized('includeAllEvents') && null !== $object->getIncludeAllEvents()) { - $data['include_all_events'] = $object->getIncludeAllEvents(); - } - if ($object->isInitialized('events') && null !== $object->getEvents()) { - $values = []; - foreach ($object->getEvents() as $value) { - $values[] = $value; - } - $data['events'] = $values; - } - if ($object->isInitialized('requestMethod') && null !== $object->getRequestMethod()) { - $data['request_method'] = $object->getRequestMethod(); - } - if ($object->isInitialized('headers') && null !== $object->getHeaders()) { - $values_1 = []; - foreach ($object->getHeaders() as $key => $value_1) { - $values_1[$key] = $value_1; - } - $data['headers'] = $values_1; - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('active') && null !== $object->getActive()) { - $data['active'] = $object->getActive(); - } - if ($object->isInitialized('useUserFieldNames') && null !== $object->getUseUserFieldNames()) { - $data['use_user_field_names'] = $object->getUseUserFieldNames(); + if ($data->isInitialized('requestMethod') && null !== $data->getRequestMethod()) { + $dataArray['request_method'] = $data->getRequestMethod(); + } + if ($data->isInitialized('headers') && null !== $data->getHeaders()) { + $values_1 = []; + foreach ($data->getHeaders() as $key => $value_1) { + $values_1[$key] = $value_1; } - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } + $dataArray['headers'] = $values_1; + } + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); + } + if ($data->isInitialized('active') && null !== $data->getActive()) { + $dataArray['active'] = $data->getActive(); + } + if ($data->isInitialized('useUserFieldNames') && null !== $data->getUseUserFieldNames()) { + $dataArray['use_user_field_names'] = $data->getUseUserFieldNames(); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedTableWebhookUpdateRequest::class => false]; } } diff --git a/generated/Normalizer/PatchedTokenUpdateNormalizer.php b/generated/Normalizer/PatchedTokenUpdateNormalizer.php index 7c45381..a9e4b0a 100644 --- a/generated/Normalizer/PatchedTokenUpdateNormalizer.php +++ b/generated/Normalizer/PatchedTokenUpdateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,82 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedTokenUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedTokenUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($this->denormalizer->denormalize($data['permissions'], \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class, 'json', $context)); - unset($data['permissions']); - } - if (\array_key_exists('rotate_key', $data)) { - $object->setRotateKey($data['rotate_key']); - unset($data['rotate_key']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate(); + if (\array_key_exists('rotate_key', $data) && \is_int($data['rotate_key'])) { + $data['rotate_key'] = (bool) $data['rotate_key']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $this->normalizer->normalize($object->getPermissions(), 'json', $context); - } - if ($object->isInitialized('rotateKey') && null !== $object->getRotateKey()) { - $data['rotate_key'] = $object->getRotateKey(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($this->denormalizer->denormalize($data['permissions'], \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class, 'json', $context)); + unset($data['permissions']); + } + if (\array_key_exists('rotate_key', $data)) { + $object->setRotateKey($data['rotate_key']); + unset($data['rotate_key']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => false]; - } + return $object; } -} else { - class PatchedTokenUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class === get_class($data); + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $this->normalizer->normalize($data->getPermissions(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($this->denormalizer->denormalize($data['permissions'], \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class, 'json', $context)); - unset($data['permissions']); - } - if (\array_key_exists('rotate_key', $data)) { - $object->setRotateKey($data['rotate_key']); - unset($data['rotate_key']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('rotateKey') && null !== $data->getRotateKey()) { + $dataArray['rotate_key'] = $data->getRotateKey(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $this->normalizer->normalize($object->getPermissions(), 'json', $context); - } - if ($object->isInitialized('rotateKey') && null !== $object->getRotateKey()) { - $data['rotate_key'] = $object->getRotateKey(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedTokenUpdate::class => false]; } } diff --git a/generated/Normalizer/PatchedTokenUpdatePermissionsNormalizer.php b/generated/Normalizer/PatchedTokenUpdatePermissionsNormalizer.php index e1aa53f..c7cd610 100644 --- a/generated/Normalizer/PatchedTokenUpdatePermissionsNormalizer.php +++ b/generated/Normalizer/PatchedTokenUpdatePermissionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedTokenUpdatePermissionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedTokenUpdatePermissionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('create', $data)) { - $object->setCreate($data['create']); - unset($data['create']); - } - if (\array_key_exists('read', $data)) { - $object->setRead($data['read']); - unset($data['read']); - } - if (\array_key_exists('update', $data)) { - $object->setUpdate($data['update']); - unset($data['update']); - } - if (\array_key_exists('delete', $data)) { - $object->setDelete($data['delete']); - unset($data['delete']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('create') && null !== $object->getCreate()) { - $data['create'] = $object->getCreate(); - } - if ($object->isInitialized('read') && null !== $object->getRead()) { - $data['read'] = $object->getRead(); - } - if ($object->isInitialized('update') && null !== $object->getUpdate()) { - $data['update'] = $object->getUpdate(); - } - if ($object->isInitialized('delete') && null !== $object->getDelete()) { - $data['delete'] = $object->getDelete(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('create', $data)) { + $object->setCreate($data['create']); + unset($data['create']); + } + if (\array_key_exists('read', $data)) { + $object->setRead($data['read']); + unset($data['read']); + } + if (\array_key_exists('update', $data)) { + $object->setUpdate($data['update']); + unset($data['update']); + } + if (\array_key_exists('delete', $data)) { + $object->setDelete($data['delete']); + unset($data['delete']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => false]; - } + return $object; } -} else { - class PatchedTokenUpdatePermissionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('create') && null !== $data->getCreate()) { + $dataArray['create'] = $data->getCreate(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class === get_class($data); + if ($data->isInitialized('read') && null !== $data->getRead()) { + $dataArray['read'] = $data->getRead(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('create', $data)) { - $object->setCreate($data['create']); - unset($data['create']); - } - if (\array_key_exists('read', $data)) { - $object->setRead($data['read']); - unset($data['read']); - } - if (\array_key_exists('update', $data)) { - $object->setUpdate($data['update']); - unset($data['update']); - } - if (\array_key_exists('delete', $data)) { - $object->setDelete($data['delete']); - unset($data['delete']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('update') && null !== $data->getUpdate()) { + $dataArray['update'] = $data->getUpdate(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('create') && null !== $object->getCreate()) { - $data['create'] = $object->getCreate(); - } - if ($object->isInitialized('read') && null !== $object->getRead()) { - $data['read'] = $object->getRead(); - } - if ($object->isInitialized('update') && null !== $object->getUpdate()) { - $data['update'] = $object->getUpdate(); - } - if ($object->isInitialized('delete') && null !== $object->getDelete()) { - $data['delete'] = $object->getDelete(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('delete') && null !== $data->getDelete()) { + $dataArray['delete'] = $data->getDelete(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedTokenUpdatePermissions::class => false]; } } diff --git a/generated/Normalizer/PatchedTrashEntryRequestNormalizer.php b/generated/Normalizer/PatchedTrashEntryRequestNormalizer.php index b5b0055..c779072 100644 --- a/generated/Normalizer/PatchedTrashEntryRequestNormalizer.php +++ b/generated/Normalizer/PatchedTrashEntryRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedTrashEntryRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedTrashEntryRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('trash_item_id', $data)) { - $object->setTrashItemId($data['trash_item_id']); - unset($data['trash_item_id']); - } - if (\array_key_exists('parent_trash_item_id', $data) && null !== $data['parent_trash_item_id']) { - $object->setParentTrashItemId($data['parent_trash_item_id']); - unset($data['parent_trash_item_id']); - } elseif (\array_key_exists('parent_trash_item_id', $data) && null === $data['parent_trash_item_id']) { - $object->setParentTrashItemId(null); - } - if (\array_key_exists('trash_item_type', $data)) { - $object->setTrashItemType($data['trash_item_type']); - unset($data['trash_item_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('trashItemId') && null !== $object->getTrashItemId()) { - $data['trash_item_id'] = $object->getTrashItemId(); - } - if ($object->isInitialized('parentTrashItemId') && null !== $object->getParentTrashItemId()) { - $data['parent_trash_item_id'] = $object->getParentTrashItemId(); - } - if ($object->isInitialized('trashItemType') && null !== $object->getTrashItemType()) { - $data['trash_item_type'] = $object->getTrashItemType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('trash_item_id', $data)) { + $object->setTrashItemId($data['trash_item_id']); + unset($data['trash_item_id']); + } + if (\array_key_exists('parent_trash_item_id', $data) && null !== $data['parent_trash_item_id']) { + $object->setParentTrashItemId($data['parent_trash_item_id']); + unset($data['parent_trash_item_id']); + } elseif (\array_key_exists('parent_trash_item_id', $data) && null === $data['parent_trash_item_id']) { + $object->setParentTrashItemId(null); + } + if (\array_key_exists('trash_item_type', $data)) { + $object->setTrashItemType($data['trash_item_type']); + unset($data['trash_item_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => false]; - } + return $object; } -} else { - class PatchedTrashEntryRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('trashItemId') && null !== $data->getTrashItemId()) { + $dataArray['trash_item_id'] = $data->getTrashItemId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class === get_class($data); + if ($data->isInitialized('parentTrashItemId') && null !== $data->getParentTrashItemId()) { + $dataArray['parent_trash_item_id'] = $data->getParentTrashItemId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('trash_item_id', $data)) { - $object->setTrashItemId($data['trash_item_id']); - unset($data['trash_item_id']); - } - if (\array_key_exists('parent_trash_item_id', $data) && null !== $data['parent_trash_item_id']) { - $object->setParentTrashItemId($data['parent_trash_item_id']); - unset($data['parent_trash_item_id']); - } elseif (\array_key_exists('parent_trash_item_id', $data) && null === $data['parent_trash_item_id']) { - $object->setParentTrashItemId(null); - } - if (\array_key_exists('trash_item_type', $data)) { - $object->setTrashItemType($data['trash_item_type']); - unset($data['trash_item_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('trashItemType') && null !== $data->getTrashItemType()) { + $dataArray['trash_item_type'] = $data->getTrashItemType(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('trashItemId') && null !== $object->getTrashItemId()) { - $data['trash_item_id'] = $object->getTrashItemId(); - } - if ($object->isInitialized('parentTrashItemId') && null !== $object->getParentTrashItemId()) { - $data['parent_trash_item_id'] = $object->getParentTrashItemId(); - } - if ($object->isInitialized('trashItemType') && null !== $object->getTrashItemType()) { - $data['trash_item_type'] = $object->getTrashItemType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedTrashEntryRequest::class => false]; } } diff --git a/generated/Normalizer/PatchedUndoRedoRequestNormalizer.php b/generated/Normalizer/PatchedUndoRedoRequestNormalizer.php index a4f2458..c63a551 100644 --- a/generated/Normalizer/PatchedUndoRedoRequestNormalizer.php +++ b/generated/Normalizer/PatchedUndoRedoRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUndoRedoRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUndoRedoRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('scopes', $data)) { - $object->setScopes($this->denormalizer->denormalize($data['scopes'], \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class, 'json', $context)); - unset($data['scopes']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('scopes') && null !== $object->getScopes()) { - $data['scopes'] = $this->normalizer->normalize($object->getScopes(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('scopes', $data)) { + $object->setScopes($this->denormalizer->denormalize($data['scopes'], \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class, 'json', $context)); + unset($data['scopes']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => false]; - } + return $object; } -} else { - class PatchedUndoRedoRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('scopes') && null !== $data->getScopes()) { + $dataArray['scopes'] = $this->normalizer->normalize($data->getScopes(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('scopes', $data)) { - $object->setScopes($this->denormalizer->denormalize($data['scopes'], \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class, 'json', $context)); - unset($data['scopes']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('scopes') && null !== $object->getScopes()) { - $data['scopes'] = $this->normalizer->normalize($object->getScopes(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequest::class => false]; } } diff --git a/generated/Normalizer/PatchedUndoRedoRequestScopesNormalizer.php b/generated/Normalizer/PatchedUndoRedoRequestScopesNormalizer.php index b6da28e..e30247f 100644 --- a/generated/Normalizer/PatchedUndoRedoRequestScopesNormalizer.php +++ b/generated/Normalizer/PatchedUndoRedoRequestScopesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,245 +20,124 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUndoRedoRequestScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUndoRedoRequestScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('root', $data) && null !== $data['root']) { - $object->setRoot($data['root']); - unset($data['root']); - } elseif (\array_key_exists('root', $data) && null === $data['root']) { - $object->setRoot(null); - } - if (\array_key_exists('workspace', $data) && null !== $data['workspace']) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } elseif (\array_key_exists('workspace', $data) && null === $data['workspace']) { - $object->setWorkspace(null); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - if (\array_key_exists('application', $data) && null !== $data['application']) { - $object->setApplication($data['application']); - unset($data['application']); - } elseif (\array_key_exists('application', $data) && null === $data['application']) { - $object->setApplication(null); - } - if (\array_key_exists('table', $data) && null !== $data['table']) { - $object->setTable($data['table']); - unset($data['table']); - } elseif (\array_key_exists('table', $data) && null === $data['table']) { - $object->setTable(null); - } - if (\array_key_exists('view', $data) && null !== $data['view']) { - $object->setView($data['view']); - unset($data['view']); - } elseif (\array_key_exists('view', $data) && null === $data['view']) { - $object->setView(null); - } - if (\array_key_exists('teams_in_workspace', $data) && null !== $data['teams_in_workspace']) { - $object->setTeamsInWorkspace($data['teams_in_workspace']); - unset($data['teams_in_workspace']); - } elseif (\array_key_exists('teams_in_workspace', $data) && null === $data['teams_in_workspace']) { - $object->setTeamsInWorkspace(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes(); + if (\array_key_exists('root', $data) && \is_int($data['root'])) { + $data['root'] = (bool) $data['root']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('root') && null !== $object->getRoot()) { - $data['root'] = $object->getRoot(); - } - if ($object->isInitialized('workspace') && null !== $object->getWorkspace()) { - $data['workspace'] = $object->getWorkspace(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - if ($object->isInitialized('application') && null !== $object->getApplication()) { - $data['application'] = $object->getApplication(); - } - if ($object->isInitialized('table') && null !== $object->getTable()) { - $data['table'] = $object->getTable(); - } - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('teamsInWorkspace') && null !== $object->getTeamsInWorkspace()) { - $data['teams_in_workspace'] = $object->getTeamsInWorkspace(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('root', $data) && null !== $data['root']) { + $object->setRoot($data['root']); + unset($data['root']); + } elseif (\array_key_exists('root', $data) && null === $data['root']) { + $object->setRoot(null); + } + if (\array_key_exists('workspace', $data) && null !== $data['workspace']) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); + } elseif (\array_key_exists('workspace', $data) && null === $data['workspace']) { + $object->setWorkspace(null); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $object->setGroup($data['group']); + unset($data['group']); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + if (\array_key_exists('application', $data) && null !== $data['application']) { + $object->setApplication($data['application']); + unset($data['application']); + } elseif (\array_key_exists('application', $data) && null === $data['application']) { + $object->setApplication(null); + } + if (\array_key_exists('table', $data) && null !== $data['table']) { + $object->setTable($data['table']); + unset($data['table']); + } elseif (\array_key_exists('table', $data) && null === $data['table']) { + $object->setTable(null); + } + if (\array_key_exists('view', $data) && null !== $data['view']) { + $object->setView($data['view']); + unset($data['view']); + } elseif (\array_key_exists('view', $data) && null === $data['view']) { + $object->setView(null); + } + if (\array_key_exists('teams_in_workspace', $data) && null !== $data['teams_in_workspace']) { + $object->setTeamsInWorkspace($data['teams_in_workspace']); + unset($data['teams_in_workspace']); + } elseif (\array_key_exists('teams_in_workspace', $data) && null === $data['teams_in_workspace']) { + $object->setTeamsInWorkspace(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => false]; - } + return $object; } -} else { - class PatchedUndoRedoRequestScopesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('root') && null !== $data->getRoot()) { + $dataArray['root'] = $data->getRoot(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class === get_class($data); + if ($data->isInitialized('workspace') && null !== $data->getWorkspace()) { + $dataArray['workspace'] = $data->getWorkspace(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('root', $data) && null !== $data['root']) { - $object->setRoot($data['root']); - unset($data['root']); - } elseif (\array_key_exists('root', $data) && null === $data['root']) { - $object->setRoot(null); - } - if (\array_key_exists('workspace', $data) && null !== $data['workspace']) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } elseif (\array_key_exists('workspace', $data) && null === $data['workspace']) { - $object->setWorkspace(null); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - if (\array_key_exists('application', $data) && null !== $data['application']) { - $object->setApplication($data['application']); - unset($data['application']); - } elseif (\array_key_exists('application', $data) && null === $data['application']) { - $object->setApplication(null); - } - if (\array_key_exists('table', $data) && null !== $data['table']) { - $object->setTable($data['table']); - unset($data['table']); - } elseif (\array_key_exists('table', $data) && null === $data['table']) { - $object->setTable(null); - } - if (\array_key_exists('view', $data) && null !== $data['view']) { - $object->setView($data['view']); - unset($data['view']); - } elseif (\array_key_exists('view', $data) && null === $data['view']) { - $object->setView(null); - } - if (\array_key_exists('teams_in_workspace', $data) && null !== $data['teams_in_workspace']) { - $object->setTeamsInWorkspace($data['teams_in_workspace']); - unset($data['teams_in_workspace']); - } elseif (\array_key_exists('teams_in_workspace', $data) && null === $data['teams_in_workspace']) { - $object->setTeamsInWorkspace(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('group') && null !== $data->getGroup()) { + $dataArray['group'] = $data->getGroup(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('root') && null !== $object->getRoot()) { - $data['root'] = $object->getRoot(); - } - if ($object->isInitialized('workspace') && null !== $object->getWorkspace()) { - $data['workspace'] = $object->getWorkspace(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - if ($object->isInitialized('application') && null !== $object->getApplication()) { - $data['application'] = $object->getApplication(); - } - if ($object->isInitialized('table') && null !== $object->getTable()) { - $data['table'] = $object->getTable(); - } - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('teamsInWorkspace') && null !== $object->getTeamsInWorkspace()) { - $data['teams_in_workspace'] = $object->getTeamsInWorkspace(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('application') && null !== $data->getApplication()) { + $dataArray['application'] = $data->getApplication(); + } + if ($data->isInitialized('table') && null !== $data->getTable()) { + $dataArray['table'] = $data->getTable(); + } + if ($data->isInitialized('view') && null !== $data->getView()) { + $dataArray['view'] = $data->getView(); + } + if ($data->isInitialized('teamsInWorkspace') && null !== $data->getTeamsInWorkspace()) { + $dataArray['teams_in_workspace'] = $data->getTeamsInWorkspace(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUndoRedoRequestScopes::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdateDomainNormalizer.php b/generated/Normalizer/PatchedUpdateDomainNormalizer.php index 6217c8d..7c6440a 100644 --- a/generated/Normalizer/PatchedUpdateDomainNormalizer.php +++ b/generated/Normalizer/PatchedUpdateDomainNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('domainName') && null !== $object->getDomainName()) { - $data['domain_name'] = $object->getDomainName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('domain_name', $data)) { + $object->setDomainName($data['domain_name']); + unset($data['domain_name']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => false]; - } + return $object; } -} else { - class PatchedUpdateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class === get_class($data); + if ($data->isInitialized('domainName') && null !== $data->getDomainName()) { + $dataArray['domain_name'] = $data->getDomainName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('domainName') && null !== $object->getDomainName()) { - $data['domain_name'] = $object->getDomainName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateDomain::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdatePageNormalizer.php b/generated/Normalizer/PatchedUpdatePageNormalizer.php index 2410c09..d80daf0 100644 --- a/generated/Normalizer/PatchedUpdatePageNormalizer.php +++ b/generated/Normalizer/PatchedUpdatePageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,177 +20,87 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdatePageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdatePageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('path') && null !== $object->getPath()) { - $data['path'] = $object->getPath(); - } - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('path', $data)) { + $object->setPath($data['path']); + unset($data['path']); + } + if (\array_key_exists('path_params', $data)) { + $values = []; + foreach ($data['path_params'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPathParams($values); + unset($data['path_params']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => false]; - } + return $object; } -} else { - class PatchedUpdatePageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class === get_class($data); + if ($data->isInitialized('path') && null !== $data->getPath()) { + $dataArray['path'] = $data->getPath(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdatePage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + if ($data->isInitialized('pathParams') && null !== $data->getPathParams()) { + $values = []; + foreach ($data->getPathParams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - return $object; + $dataArray['path_params'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('path') && null !== $object->getPath()) { - $data['path'] = $object->getPath(); - } - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdatePage::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdatePremiumViewAttributesNormalizer.php b/generated/Normalizer/PatchedUpdatePremiumViewAttributesNormalizer.php index 2d0fa3a..b5faa9e 100644 --- a/generated/Normalizer/PatchedUpdatePremiumViewAttributesNormalizer.php +++ b/generated/Normalizer/PatchedUpdatePremiumViewAttributesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdatePremiumViewAttributesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdatePremiumViewAttributesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes(); + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => false]; - } + return $object; } -} else { - class PatchedUpdatePremiumViewAttributesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdatePremiumViewAttributes::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdateViewFilterGroupNormalizer.php b/generated/Normalizer/PatchedUpdateViewFilterGroupNormalizer.php index 44b827a..f049677 100644 --- a/generated/Normalizer/PatchedUpdateViewFilterGroupNormalizer.php +++ b/generated/Normalizer/PatchedUpdateViewFilterGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdateViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdateViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => false]; - } + return $object; } -} else { - class PatchedUpdateViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilterGroup::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdateViewFilterNormalizer.php b/generated/Normalizer/PatchedUpdateViewFilterNormalizer.php index af941c9..5c01f48 100644 --- a/generated/Normalizer/PatchedUpdateViewFilterNormalizer.php +++ b/generated/Normalizer/PatchedUpdateViewFilterNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdateViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdateViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('field') && null !== $object->getField()) { - $data['field'] = $object->getField(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => false]; - } + return $object; } -} else { - class PatchedUpdateViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('field') && null !== $data->getField()) { + $dataArray['field'] = $data->getField(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('field') && null !== $object->getField()) { - $data['field'] = $object->getField(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewFilter::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdateViewGroupByNormalizer.php b/generated/Normalizer/PatchedUpdateViewGroupByNormalizer.php index b1354cc..30a46a6 100644 --- a/generated/Normalizer/PatchedUpdateViewGroupByNormalizer.php +++ b/generated/Normalizer/PatchedUpdateViewGroupByNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdateViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdateViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('field') && null !== $object->getField()) { - $data['field'] = $object->getField(); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => false]; - } + return $object; } -} else { - class PatchedUpdateViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('field') && null !== $data->getField()) { + $dataArray['field'] = $data->getField(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class === get_class($data); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('field') && null !== $object->getField()) { - $data['field'] = $object->getField(); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewGroupBy::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdateViewSortNormalizer.php b/generated/Normalizer/PatchedUpdateViewSortNormalizer.php index 750e4a6..b3f2912 100644 --- a/generated/Normalizer/PatchedUpdateViewSortNormalizer.php +++ b/generated/Normalizer/PatchedUpdateViewSortNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdateViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdateViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('field') && null !== $object->getField()) { - $data['field'] = $object->getField(); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => false]; - } + return $object; } -} else { - class PatchedUpdateViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('field') && null !== $data->getField()) { + $dataArray['field'] = $data->getField(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class === get_class($data); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('field') && null !== $object->getField()) { - $data['field'] = $object->getField(); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateViewSort::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdateWorkspaceInvitationNormalizer.php b/generated/Normalizer/PatchedUpdateWorkspaceInvitationNormalizer.php index 700ed59..0e409af 100644 --- a/generated/Normalizer/PatchedUpdateWorkspaceInvitationNormalizer.php +++ b/generated/Normalizer/PatchedUpdateWorkspaceInvitationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdateWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdateWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => false]; - } + return $object; } -} else { - class PatchedUpdateWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $data->getPermissions(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceInvitation::class => false]; } } diff --git a/generated/Normalizer/PatchedUpdateWorkspaceUserNormalizer.php b/generated/Normalizer/PatchedUpdateWorkspaceUserNormalizer.php index 9d66bcc..f48b5ce 100644 --- a/generated/Normalizer/PatchedUpdateWorkspaceUserNormalizer.php +++ b/generated/Normalizer/PatchedUpdateWorkspaceUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUpdateWorkspaceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUpdateWorkspaceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => false]; - } + return $object; } -} else { - class PatchedUpdateWorkspaceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $data->getPermissions(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUpdateWorkspaceUser::class => false]; } } diff --git a/generated/Normalizer/PatchedUserAdminUpdateNormalizer.php b/generated/Normalizer/PatchedUserAdminUpdateNormalizer.php index 26631af..d002f8f 100644 --- a/generated/Normalizer/PatchedUserAdminUpdateNormalizer.php +++ b/generated/Normalizer/PatchedUserAdminUpdateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,189 +20,99 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedUserAdminUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedUserAdminUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('is_staff', $data)) { - $object->setIsStaff($data['is_staff']); - unset($data['is_staff']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate(); + if (\array_key_exists('is_active', $data) && \is_int($data['is_active'])) { + $data['is_active'] = (bool) $data['is_active']; + } + if (\array_key_exists('is_staff', $data) && \is_int($data['is_staff'])) { + $data['is_staff'] = (bool) $data['is_staff']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { - $data['is_active'] = $object->getIsActive(); - } - if ($object->isInitialized('isStaff') && null !== $object->getIsStaff()) { - $data['is_staff'] = $object->getIsStaff(); - } - if ($object->isInitialized('password') && null !== $object->getPassword()) { - $data['password'] = $object->getPassword(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('is_active', $data)) { + $object->setIsActive($data['is_active']); + unset($data['is_active']); + } + if (\array_key_exists('is_staff', $data)) { + $object->setIsStaff($data['is_staff']); + unset($data['is_staff']); + } + if (\array_key_exists('password', $data)) { + $object->setPassword($data['password']); + unset($data['password']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => false]; - } + return $object; } -} else { - class PatchedUserAdminUpdateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('username') && null !== $data->getUsername()) { + $dataArray['username'] = $data->getUsername(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class === get_class($data); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('is_staff', $data)) { - $object->setIsStaff($data['is_staff']); - unset($data['is_staff']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('isActive') && null !== $data->getIsActive()) { + $dataArray['is_active'] = $data->getIsActive(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { - $data['is_active'] = $object->getIsActive(); - } - if ($object->isInitialized('isStaff') && null !== $object->getIsStaff()) { - $data['is_staff'] = $object->getIsStaff(); - } - if ($object->isInitialized('password') && null !== $object->getPassword()) { - $data['password'] = $object->getPassword(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('isStaff') && null !== $data->getIsStaff()) { + $dataArray['is_staff'] = $data->getIsStaff(); + } + if ($data->isInitialized('password') && null !== $data->getPassword()) { + $dataArray['password'] = $data->getPassword(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedUserAdminUpdate::class => false]; } } diff --git a/generated/Normalizer/PatchedWorkspaceNormalizer.php b/generated/Normalizer/PatchedWorkspaceNormalizer.php index 9560592..b2e6557 100644 --- a/generated/Normalizer/PatchedWorkspaceNormalizer.php +++ b/generated/Normalizer/PatchedWorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,149 +20,73 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PatchedWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PatchedWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PatchedWorkspace(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class PatchedWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class === $type; + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PatchedWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PatchedWorkspace::class => false]; } } diff --git a/generated/Normalizer/PathParamNormalizer.php b/generated/Normalizer/PathParamNormalizer.php index 036642c..448745f 100644 --- a/generated/Normalizer/PathParamNormalizer.php +++ b/generated/Normalizer/PathParamNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PathParamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PathParamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PathParam::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PathParam::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PathParam::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PathParam::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PathParam(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PathParam(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PathParam::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class PathParamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PathParam::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PathParam::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PathParam(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PathParam::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PathParam::class => false]; } } diff --git a/generated/Normalizer/PermissionObjectNormalizer.php b/generated/Normalizer/PermissionObjectNormalizer.php index f35feba..cd197f1 100644 --- a/generated/Normalizer/PermissionObjectNormalizer.php +++ b/generated/Normalizer/PermissionObjectNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PermissionObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PermissionObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PermissionObject::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PermissionObject::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PermissionObject::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PermissionObject::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PermissionObject(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PermissionObject(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['permissions'] = $object->getPermissions(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PermissionObject::class => false]; + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); } - } -} else { - class PermissionObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PermissionObject::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PermissionObject::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PermissionObject(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['permissions'] = $data->getPermissions(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['permissions'] = $object->getPermissions(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PermissionObject::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PermissionObject::class => false]; } } diff --git a/generated/Normalizer/PhoneNumberFieldCreateFieldNormalizer.php b/generated/Normalizer/PhoneNumberFieldCreateFieldNormalizer.php index ae2fddd..1b9ea74 100644 --- a/generated/Normalizer/PhoneNumberFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/PhoneNumberFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PhoneNumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PhoneNumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class PhoneNumberFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/PhoneNumberFieldFieldNormalizer.php b/generated/Normalizer/PhoneNumberFieldFieldNormalizer.php index f67a8af..2332dd2 100644 --- a/generated/Normalizer/PhoneNumberFieldFieldNormalizer.php +++ b/generated/Normalizer/PhoneNumberFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PhoneNumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PhoneNumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => false]; - } + return $object; } -} else { - class PhoneNumberFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldField::class => false]; } } diff --git a/generated/Normalizer/PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer.php index 01fcd3a..3db9459 100644 --- a/generated/Normalizer/PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class PhoneNumberFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/PhoneNumberFieldUpdateFieldNormalizer.php b/generated/Normalizer/PhoneNumberFieldUpdateFieldNormalizer.php index 0e11c14..b8a70fb 100644 --- a/generated/Normalizer/PhoneNumberFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/PhoneNumberFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PhoneNumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PhoneNumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => false]; - } + return $object; } -} else { - class PhoneNumberFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PhoneNumberFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/PublicBuilderNormalizer.php b/generated/Normalizer/PublicBuilderNormalizer.php index 878d6a8..6be729c 100644 --- a/generated/Normalizer/PublicBuilderNormalizer.php +++ b/generated/Normalizer/PublicBuilderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,193 +20,95 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicBuilderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicBuilderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicBuilder::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicBuilder::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicBuilder::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicBuilder::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicBuilder(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('pages', $data)) { - $values = []; - foreach ($data['pages'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicPage::class, 'json', $context); - } - $object->setPages($values); - unset($data['pages']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('theme', $data)) { - $object->setTheme($this->denormalizer->denormalize($data['theme'], \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class, 'json', $context)); - unset($data['theme']); - } - if (\array_key_exists('user_sources', $data)) { - $values_1 = []; - foreach ($data['user_sources'] as $value_1) { - $values_1[] = $value_1; - } - $object->setUserSources($values_1); - unset($data['user_sources']); - } - if (\array_key_exists('favicon_file', $data)) { - $object->setFaviconFile($data['favicon_file']); - unset($data['favicon_file']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicBuilder(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicBuilder::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class PublicBuilderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicBuilder::class === $type; + if (\array_key_exists('pages', $data)) { + $values = []; + foreach ($data['pages'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicPage::class, 'json', $context); + } + $object->setPages($values); + unset($data['pages']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicBuilder::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicBuilder(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('pages', $data)) { - $values = []; - foreach ($data['pages'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicPage::class, 'json', $context); - } - $object->setPages($values); - unset($data['pages']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('theme', $data)) { - $object->setTheme($this->denormalizer->denormalize($data['theme'], \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class, 'json', $context)); - unset($data['theme']); - } - if (\array_key_exists('user_sources', $data)) { - $values_1 = []; - foreach ($data['user_sources'] as $value_1) { - $values_1[] = $value_1; - } - $object->setUserSources($values_1); - unset($data['user_sources']); - } - if (\array_key_exists('favicon_file', $data)) { - $object->setFaviconFile($data['favicon_file']); - unset($data['favicon_file']); + if (\array_key_exists('theme', $data)) { + $object->setTheme($this->denormalizer->denormalize($data['theme'], \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class, 'json', $context)); + unset($data['theme']); + } + if (\array_key_exists('user_sources', $data)) { + $values_1 = []; + foreach ($data['user_sources'] as $value_1) { + $values_1[] = $value_1; } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } + $object->setUserSources($values_1); + unset($data['user_sources']); + } + if (\array_key_exists('favicon_file', $data)) { + $object->setFaviconFile($data['favicon_file']); + unset($data['favicon_file']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicBuilder::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicBuilder::class => false]; } } diff --git a/generated/Normalizer/PublicBuilderThemeNormalizer.php b/generated/Normalizer/PublicBuilderThemeNormalizer.php index 7fdbf94..0ac34d1 100644 --- a/generated/Normalizer/PublicBuilderThemeNormalizer.php +++ b/generated/Normalizer/PublicBuilderThemeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,977 +20,487 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicBuilderThemeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicBuilderThemeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('primary_color', $data)) { - $object->setPrimaryColor($data['primary_color']); - unset($data['primary_color']); - } - if (\array_key_exists('secondary_color', $data)) { - $object->setSecondaryColor($data['secondary_color']); - unset($data['secondary_color']); - } - if (\array_key_exists('border_color', $data)) { - $object->setBorderColor($data['border_color']); - unset($data['border_color']); - } - if (\array_key_exists('main_success_color', $data)) { - $object->setMainSuccessColor($data['main_success_color']); - unset($data['main_success_color']); - } - if (\array_key_exists('main_warning_color', $data)) { - $object->setMainWarningColor($data['main_warning_color']); - unset($data['main_warning_color']); - } - if (\array_key_exists('main_error_color', $data)) { - $object->setMainErrorColor($data['main_error_color']); - unset($data['main_error_color']); - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { - $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); - unset($data['page_background_file']); - } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { - $object->setPageBackgroundFile(null); - } - if (\array_key_exists('page_background_color', $data)) { - $object->setPageBackgroundColor($data['page_background_color']); - unset($data['page_background_color']); - } - if (\array_key_exists('page_background_mode', $data)) { - $object->setPageBackgroundMode($data['page_background_mode']); - unset($data['page_background_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('primaryColor') && null !== $object->getPrimaryColor()) { - $data['primary_color'] = $object->getPrimaryColor(); - } - if ($object->isInitialized('secondaryColor') && null !== $object->getSecondaryColor()) { - $data['secondary_color'] = $object->getSecondaryColor(); - } - if ($object->isInitialized('borderColor') && null !== $object->getBorderColor()) { - $data['border_color'] = $object->getBorderColor(); - } - if ($object->isInitialized('mainSuccessColor') && null !== $object->getMainSuccessColor()) { - $data['main_success_color'] = $object->getMainSuccessColor(); - } - if ($object->isInitialized('mainWarningColor') && null !== $object->getMainWarningColor()) { - $data['main_warning_color'] = $object->getMainWarningColor(); - } - if ($object->isInitialized('mainErrorColor') && null !== $object->getMainErrorColor()) { - $data['main_error_color'] = $object->getMainErrorColor(); - } - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - if ($object->isInitialized('pageBackgroundFile') && null !== $object->getPageBackgroundFile()) { - $data['page_background_file'] = $this->normalizer->normalize($object->getPageBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('pageBackgroundColor') && null !== $object->getPageBackgroundColor()) { - $data['page_background_color'] = $object->getPageBackgroundColor(); - } - if ($object->isInitialized('pageBackgroundMode') && null !== $object->getPageBackgroundMode()) { - $data['page_background_mode'] = $object->getPageBackgroundMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('primary_color', $data)) { + $object->setPrimaryColor($data['primary_color']); + unset($data['primary_color']); + } + if (\array_key_exists('secondary_color', $data)) { + $object->setSecondaryColor($data['secondary_color']); + unset($data['secondary_color']); + } + if (\array_key_exists('border_color', $data)) { + $object->setBorderColor($data['border_color']); + unset($data['border_color']); + } + if (\array_key_exists('main_success_color', $data)) { + $object->setMainSuccessColor($data['main_success_color']); + unset($data['main_success_color']); + } + if (\array_key_exists('main_warning_color', $data)) { + $object->setMainWarningColor($data['main_warning_color']); + unset($data['main_warning_color']); + } + if (\array_key_exists('main_error_color', $data)) { + $object->setMainErrorColor($data['main_error_color']); + unset($data['main_error_color']); + } + if (\array_key_exists('body_font_family', $data)) { + $object->setBodyFontFamily($data['body_font_family']); + unset($data['body_font_family']); + } + if (\array_key_exists('body_font_size', $data)) { + $object->setBodyFontSize($data['body_font_size']); + unset($data['body_font_size']); + } + if (\array_key_exists('body_text_color', $data)) { + $object->setBodyTextColor($data['body_text_color']); + unset($data['body_text_color']); + } + if (\array_key_exists('body_text_alignment', $data)) { + $object->setBodyTextAlignment($data['body_text_alignment']); + unset($data['body_text_alignment']); + } + if (\array_key_exists('heading_1_font_family', $data)) { + $object->setHeading1FontFamily($data['heading_1_font_family']); + unset($data['heading_1_font_family']); + } + if (\array_key_exists('heading_1_font_size', $data)) { + $object->setHeading1FontSize($data['heading_1_font_size']); + unset($data['heading_1_font_size']); + } + if (\array_key_exists('heading_1_text_color', $data)) { + $object->setHeading1TextColor($data['heading_1_text_color']); + unset($data['heading_1_text_color']); + } + if (\array_key_exists('heading_1_text_alignment', $data)) { + $object->setHeading1TextAlignment($data['heading_1_text_alignment']); + unset($data['heading_1_text_alignment']); + } + if (\array_key_exists('heading_2_font_family', $data)) { + $object->setHeading2FontFamily($data['heading_2_font_family']); + unset($data['heading_2_font_family']); + } + if (\array_key_exists('heading_2_font_size', $data)) { + $object->setHeading2FontSize($data['heading_2_font_size']); + unset($data['heading_2_font_size']); + } + if (\array_key_exists('heading_2_text_color', $data)) { + $object->setHeading2TextColor($data['heading_2_text_color']); + unset($data['heading_2_text_color']); + } + if (\array_key_exists('heading_2_text_alignment', $data)) { + $object->setHeading2TextAlignment($data['heading_2_text_alignment']); + unset($data['heading_2_text_alignment']); + } + if (\array_key_exists('heading_3_font_family', $data)) { + $object->setHeading3FontFamily($data['heading_3_font_family']); + unset($data['heading_3_font_family']); + } + if (\array_key_exists('heading_3_font_size', $data)) { + $object->setHeading3FontSize($data['heading_3_font_size']); + unset($data['heading_3_font_size']); + } + if (\array_key_exists('heading_3_text_color', $data)) { + $object->setHeading3TextColor($data['heading_3_text_color']); + unset($data['heading_3_text_color']); + } + if (\array_key_exists('heading_3_text_alignment', $data)) { + $object->setHeading3TextAlignment($data['heading_3_text_alignment']); + unset($data['heading_3_text_alignment']); + } + if (\array_key_exists('heading_4_font_family', $data)) { + $object->setHeading4FontFamily($data['heading_4_font_family']); + unset($data['heading_4_font_family']); + } + if (\array_key_exists('heading_4_font_size', $data)) { + $object->setHeading4FontSize($data['heading_4_font_size']); + unset($data['heading_4_font_size']); + } + if (\array_key_exists('heading_4_text_color', $data)) { + $object->setHeading4TextColor($data['heading_4_text_color']); + unset($data['heading_4_text_color']); + } + if (\array_key_exists('heading_4_text_alignment', $data)) { + $object->setHeading4TextAlignment($data['heading_4_text_alignment']); + unset($data['heading_4_text_alignment']); + } + if (\array_key_exists('heading_5_font_family', $data)) { + $object->setHeading5FontFamily($data['heading_5_font_family']); + unset($data['heading_5_font_family']); + } + if (\array_key_exists('heading_5_font_size', $data)) { + $object->setHeading5FontSize($data['heading_5_font_size']); + unset($data['heading_5_font_size']); + } + if (\array_key_exists('heading_5_text_color', $data)) { + $object->setHeading5TextColor($data['heading_5_text_color']); + unset($data['heading_5_text_color']); + } + if (\array_key_exists('heading_5_text_alignment', $data)) { + $object->setHeading5TextAlignment($data['heading_5_text_alignment']); + unset($data['heading_5_text_alignment']); + } + if (\array_key_exists('heading_6_font_family', $data)) { + $object->setHeading6FontFamily($data['heading_6_font_family']); + unset($data['heading_6_font_family']); + } + if (\array_key_exists('heading_6_font_size', $data)) { + $object->setHeading6FontSize($data['heading_6_font_size']); + unset($data['heading_6_font_size']); + } + if (\array_key_exists('heading_6_text_color', $data)) { + $object->setHeading6TextColor($data['heading_6_text_color']); + unset($data['heading_6_text_color']); + } + if (\array_key_exists('heading_6_text_alignment', $data)) { + $object->setHeading6TextAlignment($data['heading_6_text_alignment']); + unset($data['heading_6_text_alignment']); + } + if (\array_key_exists('button_font_family', $data)) { + $object->setButtonFontFamily($data['button_font_family']); + unset($data['button_font_family']); + } + if (\array_key_exists('button_font_size', $data)) { + $object->setButtonFontSize($data['button_font_size']); + unset($data['button_font_size']); + } + if (\array_key_exists('button_alignment', $data)) { + $object->setButtonAlignment($data['button_alignment']); + unset($data['button_alignment']); + } + if (\array_key_exists('button_text_alignment', $data)) { + $object->setButtonTextAlignment($data['button_text_alignment']); + unset($data['button_text_alignment']); + } + if (\array_key_exists('button_width', $data)) { + $object->setButtonWidth($data['button_width']); + unset($data['button_width']); + } + if (\array_key_exists('button_background_color', $data)) { + $object->setButtonBackgroundColor($data['button_background_color']); + unset($data['button_background_color']); + } + if (\array_key_exists('button_text_color', $data)) { + $object->setButtonTextColor($data['button_text_color']); + unset($data['button_text_color']); + } + if (\array_key_exists('button_border_color', $data)) { + $object->setButtonBorderColor($data['button_border_color']); + unset($data['button_border_color']); + } + if (\array_key_exists('button_border_size', $data)) { + $object->setButtonBorderSize($data['button_border_size']); + unset($data['button_border_size']); + } + if (\array_key_exists('button_border_radius', $data)) { + $object->setButtonBorderRadius($data['button_border_radius']); + unset($data['button_border_radius']); + } + if (\array_key_exists('button_vertical_padding', $data)) { + $object->setButtonVerticalPadding($data['button_vertical_padding']); + unset($data['button_vertical_padding']); + } + if (\array_key_exists('button_horizontal_padding', $data)) { + $object->setButtonHorizontalPadding($data['button_horizontal_padding']); + unset($data['button_horizontal_padding']); + } + if (\array_key_exists('button_hover_background_color', $data)) { + $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); + unset($data['button_hover_background_color']); + } + if (\array_key_exists('button_hover_text_color', $data)) { + $object->setButtonHoverTextColor($data['button_hover_text_color']); + unset($data['button_hover_text_color']); + } + if (\array_key_exists('button_hover_border_color', $data)) { + $object->setButtonHoverBorderColor($data['button_hover_border_color']); + unset($data['button_hover_border_color']); + } + if (\array_key_exists('link_font_family', $data)) { + $object->setLinkFontFamily($data['link_font_family']); + unset($data['link_font_family']); + } + if (\array_key_exists('link_font_size', $data)) { + $object->setLinkFontSize($data['link_font_size']); + unset($data['link_font_size']); + } + if (\array_key_exists('link_text_alignment', $data)) { + $object->setLinkTextAlignment($data['link_text_alignment']); + unset($data['link_text_alignment']); + } + if (\array_key_exists('link_text_color', $data)) { + $object->setLinkTextColor($data['link_text_color']); + unset($data['link_text_color']); + } + if (\array_key_exists('link_hover_text_color', $data)) { + $object->setLinkHoverTextColor($data['link_hover_text_color']); + unset($data['link_hover_text_color']); + } + if (\array_key_exists('image_max_height', $data)) { + $object->setImageMaxHeight($data['image_max_height']); + unset($data['image_max_height']); + } + if (\array_key_exists('image_alignment', $data)) { + $object->setImageAlignment($data['image_alignment']); + unset($data['image_alignment']); + } + if (\array_key_exists('image_max_width', $data)) { + $object->setImageMaxWidth($data['image_max_width']); + unset($data['image_max_width']); + } + if (\array_key_exists('image_constraint', $data)) { + $object->setImageConstraint($data['image_constraint']); + unset($data['image_constraint']); + } + if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { + $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); + unset($data['page_background_file']); + } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { + $object->setPageBackgroundFile(null); + } + if (\array_key_exists('page_background_color', $data)) { + $object->setPageBackgroundColor($data['page_background_color']); + unset($data['page_background_color']); + } + if (\array_key_exists('page_background_mode', $data)) { + $object->setPageBackgroundMode($data['page_background_mode']); + unset($data['page_background_mode']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => false]; - } + return $object; } -} else { - class PublicBuilderThemeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('primaryColor') && null !== $data->getPrimaryColor()) { + $dataArray['primary_color'] = $data->getPrimaryColor(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class === get_class($data); + if ($data->isInitialized('secondaryColor') && null !== $data->getSecondaryColor()) { + $dataArray['secondary_color'] = $data->getSecondaryColor(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicBuilderTheme(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('primary_color', $data)) { - $object->setPrimaryColor($data['primary_color']); - unset($data['primary_color']); - } - if (\array_key_exists('secondary_color', $data)) { - $object->setSecondaryColor($data['secondary_color']); - unset($data['secondary_color']); - } - if (\array_key_exists('border_color', $data)) { - $object->setBorderColor($data['border_color']); - unset($data['border_color']); - } - if (\array_key_exists('main_success_color', $data)) { - $object->setMainSuccessColor($data['main_success_color']); - unset($data['main_success_color']); - } - if (\array_key_exists('main_warning_color', $data)) { - $object->setMainWarningColor($data['main_warning_color']); - unset($data['main_warning_color']); - } - if (\array_key_exists('main_error_color', $data)) { - $object->setMainErrorColor($data['main_error_color']); - unset($data['main_error_color']); - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - if (\array_key_exists('button_font_family', $data)) { - $object->setButtonFontFamily($data['button_font_family']); - unset($data['button_font_family']); - } - if (\array_key_exists('button_font_size', $data)) { - $object->setButtonFontSize($data['button_font_size']); - unset($data['button_font_size']); - } - if (\array_key_exists('button_alignment', $data)) { - $object->setButtonAlignment($data['button_alignment']); - unset($data['button_alignment']); - } - if (\array_key_exists('button_text_alignment', $data)) { - $object->setButtonTextAlignment($data['button_text_alignment']); - unset($data['button_text_alignment']); - } - if (\array_key_exists('button_width', $data)) { - $object->setButtonWidth($data['button_width']); - unset($data['button_width']); - } - if (\array_key_exists('button_background_color', $data)) { - $object->setButtonBackgroundColor($data['button_background_color']); - unset($data['button_background_color']); - } - if (\array_key_exists('button_text_color', $data)) { - $object->setButtonTextColor($data['button_text_color']); - unset($data['button_text_color']); - } - if (\array_key_exists('button_border_color', $data)) { - $object->setButtonBorderColor($data['button_border_color']); - unset($data['button_border_color']); - } - if (\array_key_exists('button_border_size', $data)) { - $object->setButtonBorderSize($data['button_border_size']); - unset($data['button_border_size']); - } - if (\array_key_exists('button_border_radius', $data)) { - $object->setButtonBorderRadius($data['button_border_radius']); - unset($data['button_border_radius']); - } - if (\array_key_exists('button_vertical_padding', $data)) { - $object->setButtonVerticalPadding($data['button_vertical_padding']); - unset($data['button_vertical_padding']); - } - if (\array_key_exists('button_horizontal_padding', $data)) { - $object->setButtonHorizontalPadding($data['button_horizontal_padding']); - unset($data['button_horizontal_padding']); - } - if (\array_key_exists('button_hover_background_color', $data)) { - $object->setButtonHoverBackgroundColor($data['button_hover_background_color']); - unset($data['button_hover_background_color']); - } - if (\array_key_exists('button_hover_text_color', $data)) { - $object->setButtonHoverTextColor($data['button_hover_text_color']); - unset($data['button_hover_text_color']); - } - if (\array_key_exists('button_hover_border_color', $data)) { - $object->setButtonHoverBorderColor($data['button_hover_border_color']); - unset($data['button_hover_border_color']); - } - if (\array_key_exists('link_font_family', $data)) { - $object->setLinkFontFamily($data['link_font_family']); - unset($data['link_font_family']); - } - if (\array_key_exists('link_font_size', $data)) { - $object->setLinkFontSize($data['link_font_size']); - unset($data['link_font_size']); - } - if (\array_key_exists('link_text_alignment', $data)) { - $object->setLinkTextAlignment($data['link_text_alignment']); - unset($data['link_text_alignment']); - } - if (\array_key_exists('link_text_color', $data)) { - $object->setLinkTextColor($data['link_text_color']); - unset($data['link_text_color']); - } - if (\array_key_exists('link_hover_text_color', $data)) { - $object->setLinkHoverTextColor($data['link_hover_text_color']); - unset($data['link_hover_text_color']); - } - if (\array_key_exists('image_max_height', $data)) { - $object->setImageMaxHeight($data['image_max_height']); - unset($data['image_max_height']); - } - if (\array_key_exists('image_alignment', $data)) { - $object->setImageAlignment($data['image_alignment']); - unset($data['image_alignment']); - } - if (\array_key_exists('image_max_width', $data)) { - $object->setImageMaxWidth($data['image_max_width']); - unset($data['image_max_width']); - } - if (\array_key_exists('image_constraint', $data)) { - $object->setImageConstraint($data['image_constraint']); - unset($data['image_constraint']); - } - if (\array_key_exists('page_background_file', $data) && null !== $data['page_background_file']) { - $object->setPageBackgroundFile($this->denormalizer->denormalize($data['page_background_file'], \CedricZiel\Baserow\Generated\Model\CombinedThemeConfigBlocksPageBackgroundFile::class, 'json', $context)); - unset($data['page_background_file']); - } elseif (\array_key_exists('page_background_file', $data) && null === $data['page_background_file']) { - $object->setPageBackgroundFile(null); - } - if (\array_key_exists('page_background_color', $data)) { - $object->setPageBackgroundColor($data['page_background_color']); - unset($data['page_background_color']); - } - if (\array_key_exists('page_background_mode', $data)) { - $object->setPageBackgroundMode($data['page_background_mode']); - unset($data['page_background_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('borderColor') && null !== $data->getBorderColor()) { + $dataArray['border_color'] = $data->getBorderColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('primaryColor') && null !== $object->getPrimaryColor()) { - $data['primary_color'] = $object->getPrimaryColor(); - } - if ($object->isInitialized('secondaryColor') && null !== $object->getSecondaryColor()) { - $data['secondary_color'] = $object->getSecondaryColor(); - } - if ($object->isInitialized('borderColor') && null !== $object->getBorderColor()) { - $data['border_color'] = $object->getBorderColor(); - } - if ($object->isInitialized('mainSuccessColor') && null !== $object->getMainSuccessColor()) { - $data['main_success_color'] = $object->getMainSuccessColor(); - } - if ($object->isInitialized('mainWarningColor') && null !== $object->getMainWarningColor()) { - $data['main_warning_color'] = $object->getMainWarningColor(); - } - if ($object->isInitialized('mainErrorColor') && null !== $object->getMainErrorColor()) { - $data['main_error_color'] = $object->getMainErrorColor(); - } - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - if ($object->isInitialized('buttonFontFamily') && null !== $object->getButtonFontFamily()) { - $data['button_font_family'] = $object->getButtonFontFamily(); - } - if ($object->isInitialized('buttonFontSize') && null !== $object->getButtonFontSize()) { - $data['button_font_size'] = $object->getButtonFontSize(); - } - if ($object->isInitialized('buttonAlignment') && null !== $object->getButtonAlignment()) { - $data['button_alignment'] = $object->getButtonAlignment(); - } - if ($object->isInitialized('buttonTextAlignment') && null !== $object->getButtonTextAlignment()) { - $data['button_text_alignment'] = $object->getButtonTextAlignment(); - } - if ($object->isInitialized('buttonWidth') && null !== $object->getButtonWidth()) { - $data['button_width'] = $object->getButtonWidth(); - } - if ($object->isInitialized('buttonBackgroundColor') && null !== $object->getButtonBackgroundColor()) { - $data['button_background_color'] = $object->getButtonBackgroundColor(); - } - if ($object->isInitialized('buttonTextColor') && null !== $object->getButtonTextColor()) { - $data['button_text_color'] = $object->getButtonTextColor(); - } - if ($object->isInitialized('buttonBorderColor') && null !== $object->getButtonBorderColor()) { - $data['button_border_color'] = $object->getButtonBorderColor(); - } - if ($object->isInitialized('buttonBorderSize') && null !== $object->getButtonBorderSize()) { - $data['button_border_size'] = $object->getButtonBorderSize(); - } - if ($object->isInitialized('buttonBorderRadius') && null !== $object->getButtonBorderRadius()) { - $data['button_border_radius'] = $object->getButtonBorderRadius(); - } - if ($object->isInitialized('buttonVerticalPadding') && null !== $object->getButtonVerticalPadding()) { - $data['button_vertical_padding'] = $object->getButtonVerticalPadding(); - } - if ($object->isInitialized('buttonHorizontalPadding') && null !== $object->getButtonHorizontalPadding()) { - $data['button_horizontal_padding'] = $object->getButtonHorizontalPadding(); - } - if ($object->isInitialized('buttonHoverBackgroundColor') && null !== $object->getButtonHoverBackgroundColor()) { - $data['button_hover_background_color'] = $object->getButtonHoverBackgroundColor(); - } - if ($object->isInitialized('buttonHoverTextColor') && null !== $object->getButtonHoverTextColor()) { - $data['button_hover_text_color'] = $object->getButtonHoverTextColor(); - } - if ($object->isInitialized('buttonHoverBorderColor') && null !== $object->getButtonHoverBorderColor()) { - $data['button_hover_border_color'] = $object->getButtonHoverBorderColor(); - } - if ($object->isInitialized('linkFontFamily') && null !== $object->getLinkFontFamily()) { - $data['link_font_family'] = $object->getLinkFontFamily(); - } - if ($object->isInitialized('linkFontSize') && null !== $object->getLinkFontSize()) { - $data['link_font_size'] = $object->getLinkFontSize(); - } - if ($object->isInitialized('linkTextAlignment') && null !== $object->getLinkTextAlignment()) { - $data['link_text_alignment'] = $object->getLinkTextAlignment(); - } - if ($object->isInitialized('linkTextColor') && null !== $object->getLinkTextColor()) { - $data['link_text_color'] = $object->getLinkTextColor(); - } - if ($object->isInitialized('linkHoverTextColor') && null !== $object->getLinkHoverTextColor()) { - $data['link_hover_text_color'] = $object->getLinkHoverTextColor(); - } - if ($object->isInitialized('imageMaxHeight') && null !== $object->getImageMaxHeight()) { - $data['image_max_height'] = $object->getImageMaxHeight(); - } - if ($object->isInitialized('imageAlignment') && null !== $object->getImageAlignment()) { - $data['image_alignment'] = $object->getImageAlignment(); - } - if ($object->isInitialized('imageMaxWidth') && null !== $object->getImageMaxWidth()) { - $data['image_max_width'] = $object->getImageMaxWidth(); - } - if ($object->isInitialized('imageConstraint') && null !== $object->getImageConstraint()) { - $data['image_constraint'] = $object->getImageConstraint(); - } - if ($object->isInitialized('pageBackgroundFile') && null !== $object->getPageBackgroundFile()) { - $data['page_background_file'] = $this->normalizer->normalize($object->getPageBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('pageBackgroundColor') && null !== $object->getPageBackgroundColor()) { - $data['page_background_color'] = $object->getPageBackgroundColor(); - } - if ($object->isInitialized('pageBackgroundMode') && null !== $object->getPageBackgroundMode()) { - $data['page_background_mode'] = $object->getPageBackgroundMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('mainSuccessColor') && null !== $data->getMainSuccessColor()) { + $dataArray['main_success_color'] = $data->getMainSuccessColor(); + } + if ($data->isInitialized('mainWarningColor') && null !== $data->getMainWarningColor()) { + $dataArray['main_warning_color'] = $data->getMainWarningColor(); + } + if ($data->isInitialized('mainErrorColor') && null !== $data->getMainErrorColor()) { + $dataArray['main_error_color'] = $data->getMainErrorColor(); + } + if ($data->isInitialized('bodyFontFamily') && null !== $data->getBodyFontFamily()) { + $dataArray['body_font_family'] = $data->getBodyFontFamily(); + } + if ($data->isInitialized('bodyFontSize') && null !== $data->getBodyFontSize()) { + $dataArray['body_font_size'] = $data->getBodyFontSize(); + } + if ($data->isInitialized('bodyTextColor') && null !== $data->getBodyTextColor()) { + $dataArray['body_text_color'] = $data->getBodyTextColor(); + } + if ($data->isInitialized('bodyTextAlignment') && null !== $data->getBodyTextAlignment()) { + $dataArray['body_text_alignment'] = $data->getBodyTextAlignment(); + } + if ($data->isInitialized('heading1FontFamily') && null !== $data->getHeading1FontFamily()) { + $dataArray['heading_1_font_family'] = $data->getHeading1FontFamily(); + } + if ($data->isInitialized('heading1FontSize') && null !== $data->getHeading1FontSize()) { + $dataArray['heading_1_font_size'] = $data->getHeading1FontSize(); + } + if ($data->isInitialized('heading1TextColor') && null !== $data->getHeading1TextColor()) { + $dataArray['heading_1_text_color'] = $data->getHeading1TextColor(); + } + if ($data->isInitialized('heading1TextAlignment') && null !== $data->getHeading1TextAlignment()) { + $dataArray['heading_1_text_alignment'] = $data->getHeading1TextAlignment(); + } + if ($data->isInitialized('heading2FontFamily') && null !== $data->getHeading2FontFamily()) { + $dataArray['heading_2_font_family'] = $data->getHeading2FontFamily(); + } + if ($data->isInitialized('heading2FontSize') && null !== $data->getHeading2FontSize()) { + $dataArray['heading_2_font_size'] = $data->getHeading2FontSize(); + } + if ($data->isInitialized('heading2TextColor') && null !== $data->getHeading2TextColor()) { + $dataArray['heading_2_text_color'] = $data->getHeading2TextColor(); + } + if ($data->isInitialized('heading2TextAlignment') && null !== $data->getHeading2TextAlignment()) { + $dataArray['heading_2_text_alignment'] = $data->getHeading2TextAlignment(); + } + if ($data->isInitialized('heading3FontFamily') && null !== $data->getHeading3FontFamily()) { + $dataArray['heading_3_font_family'] = $data->getHeading3FontFamily(); + } + if ($data->isInitialized('heading3FontSize') && null !== $data->getHeading3FontSize()) { + $dataArray['heading_3_font_size'] = $data->getHeading3FontSize(); + } + if ($data->isInitialized('heading3TextColor') && null !== $data->getHeading3TextColor()) { + $dataArray['heading_3_text_color'] = $data->getHeading3TextColor(); + } + if ($data->isInitialized('heading3TextAlignment') && null !== $data->getHeading3TextAlignment()) { + $dataArray['heading_3_text_alignment'] = $data->getHeading3TextAlignment(); + } + if ($data->isInitialized('heading4FontFamily') && null !== $data->getHeading4FontFamily()) { + $dataArray['heading_4_font_family'] = $data->getHeading4FontFamily(); + } + if ($data->isInitialized('heading4FontSize') && null !== $data->getHeading4FontSize()) { + $dataArray['heading_4_font_size'] = $data->getHeading4FontSize(); + } + if ($data->isInitialized('heading4TextColor') && null !== $data->getHeading4TextColor()) { + $dataArray['heading_4_text_color'] = $data->getHeading4TextColor(); + } + if ($data->isInitialized('heading4TextAlignment') && null !== $data->getHeading4TextAlignment()) { + $dataArray['heading_4_text_alignment'] = $data->getHeading4TextAlignment(); + } + if ($data->isInitialized('heading5FontFamily') && null !== $data->getHeading5FontFamily()) { + $dataArray['heading_5_font_family'] = $data->getHeading5FontFamily(); + } + if ($data->isInitialized('heading5FontSize') && null !== $data->getHeading5FontSize()) { + $dataArray['heading_5_font_size'] = $data->getHeading5FontSize(); + } + if ($data->isInitialized('heading5TextColor') && null !== $data->getHeading5TextColor()) { + $dataArray['heading_5_text_color'] = $data->getHeading5TextColor(); + } + if ($data->isInitialized('heading5TextAlignment') && null !== $data->getHeading5TextAlignment()) { + $dataArray['heading_5_text_alignment'] = $data->getHeading5TextAlignment(); + } + if ($data->isInitialized('heading6FontFamily') && null !== $data->getHeading6FontFamily()) { + $dataArray['heading_6_font_family'] = $data->getHeading6FontFamily(); + } + if ($data->isInitialized('heading6FontSize') && null !== $data->getHeading6FontSize()) { + $dataArray['heading_6_font_size'] = $data->getHeading6FontSize(); + } + if ($data->isInitialized('heading6TextColor') && null !== $data->getHeading6TextColor()) { + $dataArray['heading_6_text_color'] = $data->getHeading6TextColor(); + } + if ($data->isInitialized('heading6TextAlignment') && null !== $data->getHeading6TextAlignment()) { + $dataArray['heading_6_text_alignment'] = $data->getHeading6TextAlignment(); + } + if ($data->isInitialized('buttonFontFamily') && null !== $data->getButtonFontFamily()) { + $dataArray['button_font_family'] = $data->getButtonFontFamily(); + } + if ($data->isInitialized('buttonFontSize') && null !== $data->getButtonFontSize()) { + $dataArray['button_font_size'] = $data->getButtonFontSize(); + } + if ($data->isInitialized('buttonAlignment') && null !== $data->getButtonAlignment()) { + $dataArray['button_alignment'] = $data->getButtonAlignment(); + } + if ($data->isInitialized('buttonTextAlignment') && null !== $data->getButtonTextAlignment()) { + $dataArray['button_text_alignment'] = $data->getButtonTextAlignment(); + } + if ($data->isInitialized('buttonWidth') && null !== $data->getButtonWidth()) { + $dataArray['button_width'] = $data->getButtonWidth(); + } + if ($data->isInitialized('buttonBackgroundColor') && null !== $data->getButtonBackgroundColor()) { + $dataArray['button_background_color'] = $data->getButtonBackgroundColor(); + } + if ($data->isInitialized('buttonTextColor') && null !== $data->getButtonTextColor()) { + $dataArray['button_text_color'] = $data->getButtonTextColor(); + } + if ($data->isInitialized('buttonBorderColor') && null !== $data->getButtonBorderColor()) { + $dataArray['button_border_color'] = $data->getButtonBorderColor(); + } + if ($data->isInitialized('buttonBorderSize') && null !== $data->getButtonBorderSize()) { + $dataArray['button_border_size'] = $data->getButtonBorderSize(); + } + if ($data->isInitialized('buttonBorderRadius') && null !== $data->getButtonBorderRadius()) { + $dataArray['button_border_radius'] = $data->getButtonBorderRadius(); + } + if ($data->isInitialized('buttonVerticalPadding') && null !== $data->getButtonVerticalPadding()) { + $dataArray['button_vertical_padding'] = $data->getButtonVerticalPadding(); + } + if ($data->isInitialized('buttonHorizontalPadding') && null !== $data->getButtonHorizontalPadding()) { + $dataArray['button_horizontal_padding'] = $data->getButtonHorizontalPadding(); + } + if ($data->isInitialized('buttonHoverBackgroundColor') && null !== $data->getButtonHoverBackgroundColor()) { + $dataArray['button_hover_background_color'] = $data->getButtonHoverBackgroundColor(); + } + if ($data->isInitialized('buttonHoverTextColor') && null !== $data->getButtonHoverTextColor()) { + $dataArray['button_hover_text_color'] = $data->getButtonHoverTextColor(); + } + if ($data->isInitialized('buttonHoverBorderColor') && null !== $data->getButtonHoverBorderColor()) { + $dataArray['button_hover_border_color'] = $data->getButtonHoverBorderColor(); + } + if ($data->isInitialized('linkFontFamily') && null !== $data->getLinkFontFamily()) { + $dataArray['link_font_family'] = $data->getLinkFontFamily(); + } + if ($data->isInitialized('linkFontSize') && null !== $data->getLinkFontSize()) { + $dataArray['link_font_size'] = $data->getLinkFontSize(); + } + if ($data->isInitialized('linkTextAlignment') && null !== $data->getLinkTextAlignment()) { + $dataArray['link_text_alignment'] = $data->getLinkTextAlignment(); + } + if ($data->isInitialized('linkTextColor') && null !== $data->getLinkTextColor()) { + $dataArray['link_text_color'] = $data->getLinkTextColor(); + } + if ($data->isInitialized('linkHoverTextColor') && null !== $data->getLinkHoverTextColor()) { + $dataArray['link_hover_text_color'] = $data->getLinkHoverTextColor(); + } + if ($data->isInitialized('imageMaxHeight') && null !== $data->getImageMaxHeight()) { + $dataArray['image_max_height'] = $data->getImageMaxHeight(); + } + if ($data->isInitialized('imageAlignment') && null !== $data->getImageAlignment()) { + $dataArray['image_alignment'] = $data->getImageAlignment(); + } + if ($data->isInitialized('imageMaxWidth') && null !== $data->getImageMaxWidth()) { + $dataArray['image_max_width'] = $data->getImageMaxWidth(); + } + if ($data->isInitialized('imageConstraint') && null !== $data->getImageConstraint()) { + $dataArray['image_constraint'] = $data->getImageConstraint(); + } + if ($data->isInitialized('pageBackgroundFile') && null !== $data->getPageBackgroundFile()) { + $dataArray['page_background_file'] = $this->normalizer->normalize($data->getPageBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('pageBackgroundColor') && null !== $data->getPageBackgroundColor()) { + $dataArray['page_background_color'] = $data->getPageBackgroundColor(); + } + if ($data->isInitialized('pageBackgroundMode') && null !== $data->getPageBackgroundMode()) { + $dataArray['page_background_mode'] = $data->getPageBackgroundMode(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicBuilderTheme::class => false]; } } diff --git a/generated/Normalizer/PublicFieldNormalizer.php b/generated/Normalizer/PublicFieldNormalizer.php index 8e022e6..3c4860c 100644 --- a/generated/Normalizer/PublicFieldNormalizer.php +++ b/generated/Normalizer/PublicFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicField::class => false]; - } + return $object; } -} else { - class PublicFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicField::class => false]; } } diff --git a/generated/Normalizer/PublicFormViewCoverImageNormalizer.php b/generated/Normalizer/PublicFormViewCoverImageNormalizer.php index 6d2d6c1..ed7f931 100644 --- a/generated/Normalizer/PublicFormViewCoverImageNormalizer.php +++ b/generated/Normalizer/PublicFormViewCoverImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicFormViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicFormViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => false]; - } + return $object; } -} else { - class PublicFormViewCoverImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class => false]; } } diff --git a/generated/Normalizer/PublicFormViewFieldNormalizer.php b/generated/Normalizer/PublicFormViewFieldNormalizer.php index 4effb3f..91fc967 100644 --- a/generated/Normalizer/PublicFormViewFieldNormalizer.php +++ b/generated/Normalizer/PublicFormViewFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicFormViewFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicFormViewFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewField(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class PublicFormViewFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewField::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicFormViewField::class => false]; } } diff --git a/generated/Normalizer/PublicFormViewFieldOptionsFieldNormalizer.php b/generated/Normalizer/PublicFormViewFieldOptionsFieldNormalizer.php index 8ab6116..021e27d 100644 --- a/generated/Normalizer/PublicFormViewFieldOptionsFieldNormalizer.php +++ b/generated/Normalizer/PublicFormViewFieldOptionsFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicFormViewFieldOptionsFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicFormViewFieldOptionsFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class PublicFormViewFieldOptionsFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class => false]; } } diff --git a/generated/Normalizer/PublicFormViewFieldOptionsNormalizer.php b/generated/Normalizer/PublicFormViewFieldOptionsNormalizer.php index 89cf218..41d4a5b 100644 --- a/generated/Normalizer/PublicFormViewFieldOptionsNormalizer.php +++ b/generated/Normalizer/PublicFormViewFieldOptionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,309 +20,159 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicFormViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicFormViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('field', $data)) { - $object->setField($this->denormalizer->denormalize($data['field'], \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class, 'json', $context)); - unset($data['field']); - } - if (\array_key_exists('show_when_matching_conditions', $data)) { - $object->setShowWhenMatchingConditions($data['show_when_matching_conditions']); - unset($data['show_when_matching_conditions']); - } - if (\array_key_exists('condition_type', $data)) { - $object->setConditionType($data['condition_type']); - unset($data['condition_type']); - } - if (\array_key_exists('conditions', $data)) { - $values = []; - foreach ($data['conditions'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class, 'json', $context); - } - $object->setConditions($values); - unset($data['conditions']); - } - if (\array_key_exists('condition_groups', $data)) { - $values_1 = []; - foreach ($data['condition_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class, 'json', $context); - } - $object->setConditionGroups($values_1); - unset($data['condition_groups']); - } - if (\array_key_exists('groups', $data)) { - $values_2 = []; - foreach ($data['groups'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class, 'json', $context); - } - $object->setGroups($values_2); - unset($data['groups']); - } - if (\array_key_exists('field_component', $data)) { - $object->setFieldComponent($data['field_component']); - unset($data['field_component']); - } - foreach ($data as $key => $value_3) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions(); + if (\array_key_exists('required', $data) && \is_int($data['required'])) { + $data['required'] = (bool) $data['required']; + } + if (\array_key_exists('show_when_matching_conditions', $data) && \is_int($data['show_when_matching_conditions'])) { + $data['show_when_matching_conditions'] = (bool) $data['show_when_matching_conditions']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('showWhenMatchingConditions') && null !== $object->getShowWhenMatchingConditions()) { - $data['show_when_matching_conditions'] = $object->getShowWhenMatchingConditions(); - } - if ($object->isInitialized('conditionType') && null !== $object->getConditionType()) { - $data['condition_type'] = $object->getConditionType(); - } - if ($object->isInitialized('conditions') && null !== $object->getConditions()) { - $values = []; - foreach ($object->getConditions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['conditions'] = $values; - } - if ($object->isInitialized('conditionGroups') && null !== $object->getConditionGroups()) { - $values_1 = []; - foreach ($object->getConditionGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['condition_groups'] = $values_1; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + if (\array_key_exists('required', $data)) { + $object->setRequired($data['required']); + unset($data['required']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('field', $data)) { + $object->setField($this->denormalizer->denormalize($data['field'], \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class, 'json', $context)); + unset($data['field']); + } + if (\array_key_exists('show_when_matching_conditions', $data)) { + $object->setShowWhenMatchingConditions($data['show_when_matching_conditions']); + unset($data['show_when_matching_conditions']); + } + if (\array_key_exists('condition_type', $data)) { + $object->setConditionType($data['condition_type']); + unset($data['condition_type']); + } + if (\array_key_exists('conditions', $data)) { + $values = []; + foreach ($data['conditions'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class, 'json', $context); } - if ($object->isInitialized('groups') && null !== $object->getGroups()) { - $values_2 = []; - foreach ($object->getGroups() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['groups'] = $values_2; + $object->setConditions($values); + unset($data['conditions']); + } + if (\array_key_exists('condition_groups', $data)) { + $values_1 = []; + foreach ($data['condition_groups'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class, 'json', $context); } - if ($object->isInitialized('fieldComponent') && null !== $object->getFieldComponent()) { - $data['field_component'] = $object->getFieldComponent(); + $object->setConditionGroups($values_1); + unset($data['condition_groups']); + } + if (\array_key_exists('groups', $data)) { + $values_2 = []; + foreach ($data['groups'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class, 'json', $context); } - foreach ($object as $key => $value_3) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_3; - } + $object->setGroups($values_2); + unset($data['groups']); + } + if (\array_key_exists('field_component', $data)) { + $object->setFieldComponent($data['field_component']); + unset($data['field_component']); + } + foreach ($data as $key => $value_3) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => false]; - } + return $object; } -} else { - class PublicFormViewFieldOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class === get_class($data); + if ($data->isInitialized('required') && null !== $data->getRequired()) { + $dataArray['required'] = $data->getRequired(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('required', $data)) { - $object->setRequired($data['required']); - unset($data['required']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('field', $data)) { - $object->setField($this->denormalizer->denormalize($data['field'], \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptionsField::class, 'json', $context)); - unset($data['field']); - } - if (\array_key_exists('show_when_matching_conditions', $data)) { - $object->setShowWhenMatchingConditions($data['show_when_matching_conditions']); - unset($data['show_when_matching_conditions']); - } - if (\array_key_exists('condition_type', $data)) { - $object->setConditionType($data['condition_type']); - unset($data['condition_type']); - } - if (\array_key_exists('conditions', $data)) { - $values = []; - foreach ($data['conditions'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsCondition::class, 'json', $context); - } - $object->setConditions($values); - unset($data['conditions']); - } - if (\array_key_exists('condition_groups', $data)) { - $values_1 = []; - foreach ($data['condition_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class, 'json', $context); - } - $object->setConditionGroups($values_1); - unset($data['condition_groups']); - } - if (\array_key_exists('groups', $data)) { - $values_2 = []; - foreach ($data['groups'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\FormViewFieldOptionsConditionGroup::class, 'json', $context); - } - $object->setGroups($values_2); - unset($data['groups']); - } - if (\array_key_exists('field_component', $data)) { - $object->setFieldComponent($data['field_component']); - unset($data['field_component']); - } - foreach ($data as $key => $value_3) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_3; - } - } - - return $object; + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('required') && null !== $object->getRequired()) { - $data['required'] = $object->getRequired(); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('showWhenMatchingConditions') && null !== $object->getShowWhenMatchingConditions()) { - $data['show_when_matching_conditions'] = $object->getShowWhenMatchingConditions(); - } - if ($object->isInitialized('conditionType') && null !== $object->getConditionType()) { - $data['condition_type'] = $object->getConditionType(); - } - if ($object->isInitialized('conditions') && null !== $object->getConditions()) { - $values = []; - foreach ($object->getConditions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['conditions'] = $values; - } - if ($object->isInitialized('conditionGroups') && null !== $object->getConditionGroups()) { - $values_1 = []; - foreach ($object->getConditionGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['condition_groups'] = $values_1; + if ($data->isInitialized('showWhenMatchingConditions') && null !== $data->getShowWhenMatchingConditions()) { + $dataArray['show_when_matching_conditions'] = $data->getShowWhenMatchingConditions(); + } + if ($data->isInitialized('conditionType') && null !== $data->getConditionType()) { + $dataArray['condition_type'] = $data->getConditionType(); + } + if ($data->isInitialized('conditions') && null !== $data->getConditions()) { + $values = []; + foreach ($data->getConditions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('groups') && null !== $object->getGroups()) { - $values_2 = []; - foreach ($object->getGroups() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['groups'] = $values_2; + $dataArray['conditions'] = $values; + } + if ($data->isInitialized('conditionGroups') && null !== $data->getConditionGroups()) { + $values_1 = []; + foreach ($data->getConditionGroups() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - if ($object->isInitialized('fieldComponent') && null !== $object->getFieldComponent()) { - $data['field_component'] = $object->getFieldComponent(); + $dataArray['condition_groups'] = $values_1; + } + if ($data->isInitialized('groups') && null !== $data->getGroups()) { + $values_2 = []; + foreach ($data->getGroups() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - foreach ($object as $key => $value_3) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_3; - } + $dataArray['groups'] = $values_2; + } + if ($data->isInitialized('fieldComponent') && null !== $data->getFieldComponent()) { + $dataArray['field_component'] = $data->getFieldComponent(); + } + foreach ($data as $key => $value_3) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class => false]; } } diff --git a/generated/Normalizer/PublicFormViewLogoImageNormalizer.php b/generated/Normalizer/PublicFormViewLogoImageNormalizer.php index e2c3578..ff89009 100644 --- a/generated/Normalizer/PublicFormViewLogoImageNormalizer.php +++ b/generated/Normalizer/PublicFormViewLogoImageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicFormViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicFormViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => false]; - } + return $object; } -} else { - class PublicFormViewLogoImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class => false]; } } diff --git a/generated/Normalizer/PublicFormViewNormalizer.php b/generated/Normalizer/PublicFormViewNormalizer.php index 1c43e32..9bb714c 100644 --- a/generated/Normalizer/PublicFormViewNormalizer.php +++ b/generated/Normalizer/PublicFormViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,251 +20,127 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicFormViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicFormViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicFormView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { - $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class, 'json', $context)); - unset($data['cover_image']); - } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { - $object->setCoverImage(null); - } - if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { - $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class, 'json', $context)); - unset($data['logo_image']); - } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { - $object->setLogoImage(null); - } - if (\array_key_exists('submit_text', $data)) { - $object->setSubmitText($data['submit_text']); - unset($data['submit_text']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicFormView(); + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('coverImage') && null !== $object->getCoverImage()) { - $data['cover_image'] = $this->normalizer->normalize($object->getCoverImage(), 'json', $context); - } - if ($object->isInitialized('logoImage') && null !== $object->getLogoImage()) { - $data['logo_image'] = $this->normalizer->normalize($object->getLogoImage(), 'json', $context); - } - if ($object->isInitialized('submitText') && null !== $object->getSubmitText()) { - $data['submit_text'] = $object->getSubmitText(); - } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + unset($data['title']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + if (\array_key_exists('mode', $data)) { + $object->setMode($data['mode']); + unset($data['mode']); + } + if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { + $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class, 'json', $context)); + unset($data['cover_image']); + } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { + $object->setCoverImage(null); + } + if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { + $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class, 'json', $context)); + unset($data['logo_image']); + } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { + $object->setLogoImage(null); + } + if (\array_key_exists('submit_text', $data)) { + $object->setSubmitText($data['submit_text']); + unset($data['submit_text']); + } + if (\array_key_exists('fields', $data)) { $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class, 'json', $context); } - $data['fields'] = $values; - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFields($values); + unset($data['fields']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormView::class => false]; - } + return $object; } -} else { - class PublicFormViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicFormView::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('title') && null !== $data->getTitle()) { + $dataArray['title'] = $data->getTitle(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicFormView::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicFormView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - if (\array_key_exists('cover_image', $data) && null !== $data['cover_image']) { - $object->setCoverImage($this->denormalizer->denormalize($data['cover_image'], \CedricZiel\Baserow\Generated\Model\PublicFormViewCoverImage::class, 'json', $context)); - unset($data['cover_image']); - } elseif (\array_key_exists('cover_image', $data) && null === $data['cover_image']) { - $object->setCoverImage(null); - } - if (\array_key_exists('logo_image', $data) && null !== $data['logo_image']) { - $object->setLogoImage($this->denormalizer->denormalize($data['logo_image'], \CedricZiel\Baserow\Generated\Model\PublicFormViewLogoImage::class, 'json', $context)); - unset($data['logo_image']); - } elseif (\array_key_exists('logo_image', $data) && null === $data['logo_image']) { - $object->setLogoImage(null); - } - if (\array_key_exists('submit_text', $data)) { - $object->setSubmitText($data['submit_text']); - unset($data['submit_text']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicFormViewFieldOptions::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('mode') && null !== $data->getMode()) { + $dataArray['mode'] = $data->getMode(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('mode') && null !== $object->getMode()) { - $data['mode'] = $object->getMode(); - } - if ($object->isInitialized('coverImage') && null !== $object->getCoverImage()) { - $data['cover_image'] = $this->normalizer->normalize($object->getCoverImage(), 'json', $context); - } - if ($object->isInitialized('logoImage') && null !== $object->getLogoImage()) { - $data['logo_image'] = $this->normalizer->normalize($object->getLogoImage(), 'json', $context); - } - if ($object->isInitialized('submitText') && null !== $object->getSubmitText()) { - $data['submit_text'] = $object->getSubmitText(); - } - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if ($data->isInitialized('coverImage') && null !== $data->getCoverImage()) { + $dataArray['cover_image'] = $this->normalizer->normalize($data->getCoverImage(), 'json', $context); + } + if ($data->isInitialized('logoImage') && null !== $data->getLogoImage()) { + $dataArray['logo_image'] = $this->normalizer->normalize($data->getLogoImage(), 'json', $context); + } + if ($data->isInitialized('submitText') && null !== $data->getSubmitText()) { + $dataArray['submit_text'] = $data->getSubmitText(); + } + $values = []; + foreach ($data->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['fields'] = $values; + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicFormView::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicFormView::class => false]; } } diff --git a/generated/Normalizer/PublicNoneNormalizer.php b/generated/Normalizer/PublicNoneNormalizer.php index 895947b..c62bc94 100644 --- a/generated/Normalizer/PublicNoneNormalizer.php +++ b/generated/Normalizer/PublicNoneNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicNoneNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicNoneNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicNone::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicNone::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicNone::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicNone::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicNone(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicNone(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('title', $data)) { + $object->setTitle($data['title']); + unset($data['title']); + } + if (\array_key_exists('description', $data)) { + $object->setDescription($data['description']); + unset($data['description']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicNone::class => false]; - } + return $object; } -} else { - class PublicNoneNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicNone::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['order'] = $data->getOrder(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('title') && null !== $data->getTitle()) { + $dataArray['title'] = $data->getTitle(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicNone::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicNone(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('title', $data)) { - $object->setTitle($data['title']); - unset($data['title']); - } - if (\array_key_exists('description', $data)) { - $object->setDescription($data['description']); - unset($data['description']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('title') && null !== $object->getTitle()) { - $data['title'] = $object->getTitle(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicNone::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicNone::class => false]; } } diff --git a/generated/Normalizer/PublicPageNormalizer.php b/generated/Normalizer/PublicPageNormalizer.php index 5394891..50445b9 100644 --- a/generated/Normalizer/PublicPageNormalizer.php +++ b/generated/Normalizer/PublicPageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,177 +20,87 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicPage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicPage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicPage(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('path', $data)) { + $object->setPath($data['path']); + unset($data['path']); + } + if (\array_key_exists('path_params', $data)) { + $values = []; + foreach ($data['path_params'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setPathParams($values); + unset($data['path_params']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicPage::class => false]; - } + return $object; } -} else { - class PublicPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicPage::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPage::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['path'] = $data->getPath(); + if ($data->isInitialized('pathParams') && null !== $data->getPathParams()) { + $values = []; + foreach ($data->getPathParams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['path_params'] = $values; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicPage::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicPage::class => false]; } } diff --git a/generated/Normalizer/PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer.php b/generated/Normalizer/PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer.php index b15d68e..4e259ab 100644 --- a/generated/Normalizer/PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer.php +++ b/generated/Normalizer/PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,213 +20,105 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values_1 = []; - foreach ($data['results'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values_1); - unset($data['results']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('fieldOptions') && null !== $object->getFieldOptions()) { - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); } - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + $object->setFieldOptions($values); + unset($data['field_options']); + } + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values_1 = []; - foreach ($object->getResults() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['results'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); } - $data['results'] = $values_1; - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } + $object->setResults($values_1); + unset($data['results']); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false]; - } + return $object; } -} else { - class PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('fieldOptions') && null !== $data->getFieldOptions()) { + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['field_options'] = $values; } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class === get_class($data); + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values_1 = []; + foreach ($data->getResults() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GalleryViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values_1 = []; - foreach ($data['results'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values_1); - unset($data['results']); + $dataArray['results'] = $values_1; + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_2; } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('fieldOptions') && null !== $object->getFieldOptions()) { - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - } - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values_1 = []; - foreach ($object->getResults() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['results'] = $values_1; - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGalleryViewFieldOptionsExampleRowResponse::class => false]; } } diff --git a/generated/Normalizer/PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer.php b/generated/Normalizer/PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer.php index 2934faf..211e52f 100644 --- a/generated/Normalizer/PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer.php +++ b/generated/Normalizer/PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,213 +20,105 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values_1 = []; - foreach ($data['results'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values_1); - unset($data['results']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('fieldOptions') && null !== $object->getFieldOptions()) { - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; + if (\array_key_exists('field_options', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['field_options'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); } - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); + $object->setFieldOptions($values); + unset($data['field_options']); + } + if (\array_key_exists('count', $data)) { + $object->setCount($data['count']); + unset($data['count']); + } + if (\array_key_exists('next', $data) && null !== $data['next']) { + $object->setNext($data['next']); + unset($data['next']); + } elseif (\array_key_exists('next', $data) && null === $data['next']) { + $object->setNext(null); + } + if (\array_key_exists('previous', $data) && null !== $data['previous']) { + $object->setPrevious($data['previous']); + unset($data['previous']); + } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { + $object->setPrevious(null); + } + if (\array_key_exists('results', $data)) { $values_1 = []; - foreach ($object->getResults() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['results'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); } - $data['results'] = $values_1; - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } + $object->setResults($values_1); + unset($data['results']); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false]; - } + return $object; } -} else { - class PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('fieldOptions') && null !== $data->getFieldOptions()) { + $values = []; + foreach ($data->getFieldOptions() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['field_options'] = $values; } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class === get_class($data); + $dataArray['count'] = $data->getCount(); + $dataArray['next'] = $data->getNext(); + $dataArray['previous'] = $data->getPrevious(); + $values_1 = []; + foreach ($data->getResults() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_options', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['field_options'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\GridViewFieldOptions::class, 'json', $context); - } - $object->setFieldOptions($values); - unset($data['field_options']); - } - if (\array_key_exists('count', $data)) { - $object->setCount($data['count']); - unset($data['count']); - } - if (\array_key_exists('next', $data) && null !== $data['next']) { - $object->setNext($data['next']); - unset($data['next']); - } elseif (\array_key_exists('next', $data) && null === $data['next']) { - $object->setNext(null); - } - if (\array_key_exists('previous', $data) && null !== $data['previous']) { - $object->setPrevious($data['previous']); - unset($data['previous']); - } elseif (\array_key_exists('previous', $data) && null === $data['previous']) { - $object->setPrevious(null); - } - if (\array_key_exists('results', $data)) { - $values_1 = []; - foreach ($data['results'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ExampleRowResponse::class, 'json', $context); - } - $object->setResults($values_1); - unset($data['results']); + $dataArray['results'] = $values_1; + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_2; } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('fieldOptions') && null !== $object->getFieldOptions()) { - $values = []; - foreach ($object->getFieldOptions() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['field_options'] = $values; - } - $data['count'] = $object->getCount(); - $data['next'] = $object->getNext(); - $data['previous'] = $object->getPrevious(); - $values_1 = []; - foreach ($object->getResults() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['results'] = $values_1; - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse::class => false]; } } diff --git a/generated/Normalizer/PublicViewAuthRequestNormalizer.php b/generated/Normalizer/PublicViewAuthRequestNormalizer.php index a39ee9d..a76707c 100644 --- a/generated/Normalizer/PublicViewAuthRequestNormalizer.php +++ b/generated/Normalizer/PublicViewAuthRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicViewAuthRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicViewAuthRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('password', $data)) { + $object->setPassword($data['password']); + unset($data['password']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => false]; - } + return $object; } -} else { - class PublicViewAuthRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['password'] = $data->getPassword(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicViewAuthRequest::class => false]; } } diff --git a/generated/Normalizer/PublicViewAuthResponseNormalizer.php b/generated/Normalizer/PublicViewAuthResponseNormalizer.php index 3a75d11..680cca8 100644 --- a/generated/Normalizer/PublicViewAuthResponseNormalizer.php +++ b/generated/Normalizer/PublicViewAuthResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicViewAuthResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicViewAuthResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['access_token'] = $object->getAccessToken(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('access_token', $data)) { + $object->setAccessToken($data['access_token']); + unset($data['access_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => false]; - } + return $object; } -} else { - class PublicViewAuthResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access_token', $data)) { - $object->setAccessToken($data['access_token']); - unset($data['access_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['access_token'] = $data->getAccessToken(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['access_token'] = $object->getAccessToken(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicViewAuthResponse::class => false]; } } diff --git a/generated/Normalizer/PublicViewGroupByNormalizer.php b/generated/Normalizer/PublicViewGroupByNormalizer.php index 9fd6227..314c028 100644 --- a/generated/Normalizer/PublicViewGroupByNormalizer.php +++ b/generated/Normalizer/PublicViewGroupByNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); + } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => false]; - } + return $object; } -} else { - class PublicViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['view'] = $data->getView(); + $dataArray['field'] = $data->getField(); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class === get_class($data); + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class => false]; } } diff --git a/generated/Normalizer/PublicViewInfoNormalizer.php b/generated/Normalizer/PublicViewInfoNormalizer.php index 6be81f8..74d1738 100644 --- a/generated/Normalizer/PublicViewInfoNormalizer.php +++ b/generated/Normalizer/PublicViewInfoNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,143 +20,70 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicViewInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicViewInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewInfo(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('view', $data)) { - $object->setView($this->denormalizer->denormalize($data['view'], \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class, 'json', $context)); - unset($data['view']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicViewInfo(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('fields', $data)) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicField::class, 'json', $context); } - - return $data; + $object->setFields($values); + unset($data['fields']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => false]; + if (\array_key_exists('view', $data)) { + $object->setView($this->denormalizer->denormalize($data['view'], \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class, 'json', $context)); + unset($data['view']); } - } -} else { - class PublicViewInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class === $type; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewInfo::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewInfo(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('view', $data)) { - $object->setView($this->denormalizer->denormalize($data['view'], \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class, 'json', $context)); - unset($data['view']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicViewInfo::class => false]; } } diff --git a/generated/Normalizer/PublicViewInfoViewNormalizer.php b/generated/Normalizer/PublicViewInfoViewNormalizer.php index 0fb9945..5cfc05b 100644 --- a/generated/Normalizer/PublicViewInfoViewNormalizer.php +++ b/generated/Normalizer/PublicViewInfoViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,235 +20,122 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicViewInfoViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicViewInfoViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewInfoView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\PublicViewTable::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('sortings', $data)) { - $values = []; - foreach ($data['sortings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicViewSort::class, 'json', $context); - } - $object->setSortings($values); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_1 = []; - foreach ($data['group_bys'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_1); - unset($data['group_bys']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicViewInfoView(); + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table', $data)) { + $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\PublicViewTable::class, 'json', $context)); + unset($data['table']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('sortings', $data)) { + $values = []; + foreach ($data['sortings'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicViewSort::class, 'json', $context); } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); + $object->setSortings($values); + unset($data['sortings']); + } + if (\array_key_exists('group_bys', $data)) { + $values_1 = []; + foreach ($data['group_bys'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setGroupBys($values_1); + unset($data['group_bys']); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => false]; - } + return $object; } -} else { - class PublicViewInfoViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['table'] = $this->normalizer->normalize($data->getTable(), 'json', $context); + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class === get_class($data); + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewInfoView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\PublicViewTable::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('sortings', $data)) { - $values = []; - foreach ($data['sortings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicViewSort::class, 'json', $context); - } - $object->setSortings($values); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_1 = []; - foreach ($data['group_bys'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_1); - unset($data['group_bys']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicViewInfoView::class => false]; } } diff --git a/generated/Normalizer/PublicViewNormalizer.php b/generated/Normalizer/PublicViewNormalizer.php index 52a3449..ef1cac2 100644 --- a/generated/Normalizer/PublicViewNormalizer.php +++ b/generated/Normalizer/PublicViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,235 +20,122 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicView::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicView::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicView::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicView::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\PublicViewTable::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('sortings', $data)) { - $values = []; - foreach ($data['sortings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicViewSort::class, 'json', $context); - } - $object->setSortings($values); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_1 = []; - foreach ($data['group_bys'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_1); - unset($data['group_bys']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicView(); + if (\array_key_exists('public', $data) && \is_int($data['public'])) { + $data['public'] = (bool) $data['public']; + } + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table', $data)) { + $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\PublicViewTable::class, 'json', $context)); + unset($data['table']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('sortings', $data)) { + $values = []; + foreach ($data['sortings'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicViewSort::class, 'json', $context); } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); + $object->setSortings($values); + unset($data['sortings']); + } + if (\array_key_exists('group_bys', $data)) { + $values_1 = []; + foreach ($data['group_bys'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setGroupBys($values_1); + unset($data['group_bys']); + } + if (\array_key_exists('public', $data)) { + $object->setPublic($data['public']); + unset($data['public']); + } + if (\array_key_exists('slug', $data)) { + $object->setSlug($data['slug']); + unset($data['slug']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicView::class => false]; - } + return $object; } -} else { - class PublicViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicView::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['table'] = $this->normalizer->normalize($data->getTable(), 'json', $context); + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('public') && null !== $data->getPublic()) { + $dataArray['public'] = $data->getPublic(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicView::class === get_class($data); + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicView(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\PublicViewTable::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('sortings', $data)) { - $values = []; - foreach ($data['sortings'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PublicViewSort::class, 'json', $context); - } - $object->setSortings($values); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_1 = []; - foreach ($data['group_bys'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\PublicViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_1); - unset($data['group_bys']); - } - if (\array_key_exists('public', $data)) { - $object->setPublic($data['public']); - unset($data['public']); - } - if (\array_key_exists('slug', $data)) { - $object->setSlug($data['slug']); - unset($data['slug']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('public') && null !== $object->getPublic()) { - $data['public'] = $object->getPublic(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicView::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicView::class => false]; } } diff --git a/generated/Normalizer/PublicViewSortNormalizer.php b/generated/Normalizer/PublicViewSortNormalizer.php index 57abbf6..5f7310d 100644 --- a/generated/Normalizer/PublicViewSortNormalizer.php +++ b/generated/Normalizer/PublicViewSortNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicViewSort::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewSort::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewSort::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewSort::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewSort(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicViewSort(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewSort::class => false]; + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); } - } -} else { - class PublicViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewSort::class === $type; + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewSort::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewSort(); - if (null === $data || false === \is_array($data)) { - return $object; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['view'] = $data->getView(); + $dataArray['field'] = $data->getField(); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewSort::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicViewSort::class => false]; } } diff --git a/generated/Normalizer/PublicViewTableNormalizer.php b/generated/Normalizer/PublicViewTableNormalizer.php index 04aadf5..83acb5d 100644 --- a/generated/Normalizer/PublicViewTableNormalizer.php +++ b/generated/Normalizer/PublicViewTableNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,135 +20,66 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublicViewTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublicViewTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublicViewTable::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewTable::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewTable::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewTable::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublicViewTable(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewTable::class => false]; + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); } - } -} else { - class PublicViewTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublicViewTable::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublicViewTable::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublicViewTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublicViewTable::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublicViewTable::class => false]; } } diff --git a/generated/Normalizer/PublishDomainJobCreateJobNormalizer.php b/generated/Normalizer/PublishDomainJobCreateJobNormalizer.php index c3f36a1..97041d3 100644 --- a/generated/Normalizer/PublishDomainJobCreateJobNormalizer.php +++ b/generated/Normalizer/PublishDomainJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublishDomainJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublishDomainJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => false]; - } + return $object; } -} else { - class PublishDomainJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublishDomainJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/PublishDomainJobJobNormalizer.php b/generated/Normalizer/PublishDomainJobJobNormalizer.php index 99d3ffc..766a3cd 100644 --- a/generated/Normalizer/PublishDomainJobJobNormalizer.php +++ b/generated/Normalizer/PublishDomainJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,169 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PublishDomainJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class PublishDomainJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class PublishDomainJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\PublishDomainJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\PublishDomainJobJob::class => false]; } } diff --git a/generated/Normalizer/RatingFieldCreateFieldNormalizer.php b/generated/Normalizer/RatingFieldCreateFieldNormalizer.php index c09bd69..171946c 100644 --- a/generated/Normalizer/RatingFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/RatingFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,199 +20,98 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RatingFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RatingFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('max_value', $data)) { - $object->setMaxValue($data['max_value']); - unset($data['max_value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('style', $data)) { - $object->setStyle($data['style']); - unset($data['style']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('maxValue') && null !== $object->getMaxValue()) { - $data['max_value'] = $object->getMaxValue(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('max_value', $data)) { + $object->setMaxValue($data['max_value']); + unset($data['max_value']); + } + if (\array_key_exists('color', $data)) { + $object->setColor($data['color']); + unset($data['color']); + } + if (\array_key_exists('style', $data)) { + $object->setStyle($data['style']); + unset($data['style']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => false]; - } + return $object; } -} else { - class RatingFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class === get_class($data); + if ($data->isInitialized('maxValue') && null !== $data->getMaxValue()) { + $dataArray['max_value'] = $data->getMaxValue(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('max_value', $data)) { - $object->setMaxValue($data['max_value']); - unset($data['max_value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('style', $data)) { - $object->setStyle($data['style']); - unset($data['style']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('color') && null !== $data->getColor()) { + $dataArray['color'] = $data->getColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('maxValue') && null !== $object->getMaxValue()) { - $data['max_value'] = $object->getMaxValue(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('style') && null !== $data->getStyle()) { + $dataArray['style'] = $data->getStyle(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RatingFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/RatingFieldFieldNormalizer.php b/generated/Normalizer/RatingFieldFieldNormalizer.php index 37c46c9..4ee670e 100644 --- a/generated/Normalizer/RatingFieldFieldNormalizer.php +++ b/generated/Normalizer/RatingFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,245 +20,127 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RatingFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RatingFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RatingFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RatingFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('max_value', $data)) { - $object->setMaxValue($data['max_value']); - unset($data['max_value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('style', $data)) { - $object->setStyle($data['style']); - unset($data['style']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('maxValue') && null !== $object->getMaxValue()) { - $data['max_value'] = $object->getMaxValue(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('max_value', $data)) { + $object->setMaxValue($data['max_value']); + unset($data['max_value']); + } + if (\array_key_exists('color', $data)) { + $object->setColor($data['color']); + unset($data['color']); + } + if (\array_key_exists('style', $data)) { + $object->setStyle($data['style']); + unset($data['style']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RatingFieldField::class => false]; - } + return $object; } -} else { - class RatingFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RatingFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('max_value', $data)) { - $object->setMaxValue($data['max_value']); - unset($data['max_value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('style', $data)) { - $object->setStyle($data['style']); - unset($data['style']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('maxValue') && null !== $data->getMaxValue()) { + $dataArray['max_value'] = $data->getMaxValue(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('maxValue') && null !== $object->getMaxValue()) { - $data['max_value'] = $object->getMaxValue(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('color') && null !== $data->getColor()) { + $dataArray['color'] = $data->getColor(); + } + if ($data->isInitialized('style') && null !== $data->getStyle()) { + $dataArray['style'] = $data->getStyle(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RatingFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RatingFieldField::class => false]; } } diff --git a/generated/Normalizer/RatingFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/RatingFieldFieldSerializerWithRelatedFieldsNormalizer.php index 46f47ab..24423c1 100644 --- a/generated/Normalizer/RatingFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/RatingFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,261 +20,135 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RatingFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RatingFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('max_value', $data)) { - $object->setMaxValue($data['max_value']); - unset($data['max_value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('style', $data)) { - $object->setStyle($data['style']); - unset($data['style']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('maxValue') && null !== $object->getMaxValue()) { - $data['max_value'] = $object->getMaxValue(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('max_value', $data)) { + $object->setMaxValue($data['max_value']); + unset($data['max_value']); + } + if (\array_key_exists('color', $data)) { + $object->setColor($data['color']); + unset($data['color']); + } + if (\array_key_exists('style', $data)) { + $object->setStyle($data['style']); + unset($data['style']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class RatingFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('max_value', $data)) { - $object->setMaxValue($data['max_value']); - unset($data['max_value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('style', $data)) { - $object->setStyle($data['style']); - unset($data['style']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('maxValue') && null !== $data->getMaxValue()) { + $dataArray['max_value'] = $data->getMaxValue(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('maxValue') && null !== $object->getMaxValue()) { - $data['max_value'] = $object->getMaxValue(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('color') && null !== $data->getColor()) { + $dataArray['color'] = $data->getColor(); + } + if ($data->isInitialized('style') && null !== $data->getStyle()) { + $dataArray['style'] = $data->getStyle(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RatingFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/RatingFieldUpdateFieldNormalizer.php b/generated/Normalizer/RatingFieldUpdateFieldNormalizer.php index c1ff9b9..3504e5a 100644 --- a/generated/Normalizer/RatingFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/RatingFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,207 +20,102 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RatingFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RatingFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('max_value', $data)) { - $object->setMaxValue($data['max_value']); - unset($data['max_value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('style', $data)) { - $object->setStyle($data['style']); - unset($data['style']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('maxValue') && null !== $object->getMaxValue()) { - $data['max_value'] = $object->getMaxValue(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('max_value', $data)) { + $object->setMaxValue($data['max_value']); + unset($data['max_value']); + } + if (\array_key_exists('color', $data)) { + $object->setColor($data['color']); + unset($data['color']); + } + if (\array_key_exists('style', $data)) { + $object->setStyle($data['style']); + unset($data['style']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => false]; - } + return $object; } -} else { - class RatingFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('max_value', $data)) { - $object->setMaxValue($data['max_value']); - unset($data['max_value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - if (\array_key_exists('style', $data)) { - $object->setStyle($data['style']); - unset($data['style']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('maxValue') && null !== $object->getMaxValue()) { - $data['max_value'] = $object->getMaxValue(); - } - if ($object->isInitialized('color') && null !== $object->getColor()) { - $data['color'] = $object->getColor(); - } - if ($object->isInitialized('style') && null !== $object->getStyle()) { - $data['style'] = $object->getStyle(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('maxValue') && null !== $data->getMaxValue()) { + $dataArray['max_value'] = $data->getMaxValue(); + } + if ($data->isInitialized('color') && null !== $data->getColor()) { + $dataArray['color'] = $data->getColor(); + } + if ($data->isInitialized('style') && null !== $data->getStyle()) { + $dataArray['style'] = $data->getStyle(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RatingFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer.php b/generated/Normalizer/RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer.php index 90fcead..428f5e2 100644 --- a/generated/Normalizer/RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class RefreshDataSourceWorkflowActionBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class === $type; + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class === get_class($data); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['order'] = $object->getOrder(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['order'] = $data->getOrder(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer.php b/generated/Normalizer/RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer.php index ae8e33d..86c2dfb 100644 --- a/generated/Normalizer/RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer.php +++ b/generated/Normalizer/RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { + $object->setElementId($data['element_id']); + unset($data['element_id']); + } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { + $object->setElementId(null); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('event', $data)) { + $object->setEvent($data['event']); + unset($data['event']); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + return $object; } -} else { - class RefreshDataSourceWorkflowActionCreateBuilderWorkflowActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('elementId') && null !== $data->getElementId()) { + $dataArray['element_id'] = $data->getElementId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class === get_class($data); + $dataArray['type'] = $data->getType(); + $dataArray['event'] = $data->getEvent(); + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('element_id', $data) && null !== $data['element_id']) { - $object->setElementId($data['element_id']); - unset($data['element_id']); - } elseif (\array_key_exists('element_id', $data) && null === $data['element_id']) { - $object->setElementId(null); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('event', $data)) { - $object->setEvent($data['event']); - unset($data['event']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('elementId') && null !== $object->getElementId()) { - $data['element_id'] = $object->getElementId(); - } - $data['type'] = $object->getType(); - $data['event'] = $object->getEvent(); - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionCreateBuilderWorkflowAction::class => false]; } } diff --git a/generated/Normalizer/RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php b/generated/Normalizer/RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php index 52dbb88..c824d27 100644 --- a/generated/Normalizer/RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php +++ b/generated/Normalizer/RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + return $object; } -} else { - class RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class === get_class($data); + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RefreshDataSourceWorkflowActionUpdateBuilderWorkflowActions::class => false]; } } diff --git a/generated/Normalizer/RegisterLicenseNormalizer.php b/generated/Normalizer/RegisterLicenseNormalizer.php index 89b1f23..b42ee14 100644 --- a/generated/Normalizer/RegisterLicenseNormalizer.php +++ b/generated/Normalizer/RegisterLicenseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RegisterLicenseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RegisterLicenseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RegisterLicense::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RegisterLicense::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RegisterLicense::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RegisterLicense::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RegisterLicense(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('license', $data)) { - $object->setLicense($data['license']); - unset($data['license']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RegisterLicense(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['license'] = $object->getLicense(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('license', $data)) { + $object->setLicense($data['license']); + unset($data['license']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RegisterLicense::class => false]; - } + return $object; } -} else { - class RegisterLicenseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RegisterLicense::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RegisterLicense::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RegisterLicense(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('license', $data)) { - $object->setLicense($data['license']); - unset($data['license']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['license'] = $data->getLicense(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['license'] = $object->getLicense(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RegisterLicense::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RegisterLicense::class => false]; } } diff --git a/generated/Normalizer/RegisterNormalizer.php b/generated/Normalizer/RegisterNormalizer.php index 49d8491..0415044 100644 --- a/generated/Normalizer/RegisterNormalizer.php +++ b/generated/Normalizer/RegisterNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RegisterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RegisterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Register::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Register::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Register::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Register::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Register(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - if (\array_key_exists('authenticate', $data)) { - $object->setAuthenticate($data['authenticate']); - unset($data['authenticate']); - } - if (\array_key_exists('group_invitation_token', $data)) { - $object->setGroupInvitationToken($data['group_invitation_token']); - unset($data['group_invitation_token']); - } - if (\array_key_exists('workspace_invitation_token', $data)) { - $object->setWorkspaceInvitationToken($data['workspace_invitation_token']); - unset($data['workspace_invitation_token']); - } - if (\array_key_exists('template_id', $data)) { - $object->setTemplateId($data['template_id']); - unset($data['template_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Register(); + if (\array_key_exists('authenticate', $data) && \is_int($data['authenticate'])) { + $data['authenticate'] = (bool) $data['authenticate']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['email'] = $object->getEmail(); - $data['password'] = $object->getPassword(); - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - if ($object->isInitialized('authenticate') && null !== $object->getAuthenticate()) { - $data['authenticate'] = $object->getAuthenticate(); - } - if ($object->isInitialized('groupInvitationToken') && null !== $object->getGroupInvitationToken()) { - $data['group_invitation_token'] = $object->getGroupInvitationToken(); - } - if ($object->isInitialized('workspaceInvitationToken') && null !== $object->getWorkspaceInvitationToken()) { - $data['workspace_invitation_token'] = $object->getWorkspaceInvitationToken(); - } - if ($object->isInitialized('templateId') && null !== $object->getTemplateId()) { - $data['template_id'] = $object->getTemplateId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); + } + if (\array_key_exists('password', $data)) { + $object->setPassword($data['password']); + unset($data['password']); + } + if (\array_key_exists('language', $data)) { + $object->setLanguage($data['language']); + unset($data['language']); + } + if (\array_key_exists('authenticate', $data)) { + $object->setAuthenticate($data['authenticate']); + unset($data['authenticate']); + } + if (\array_key_exists('group_invitation_token', $data)) { + $object->setGroupInvitationToken($data['group_invitation_token']); + unset($data['group_invitation_token']); + } + if (\array_key_exists('workspace_invitation_token', $data)) { + $object->setWorkspaceInvitationToken($data['workspace_invitation_token']); + unset($data['workspace_invitation_token']); + } + if (\array_key_exists('template_id', $data)) { + $object->setTemplateId($data['template_id']); + unset($data['template_id']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Register::class => false]; - } + return $object; } -} else { - class RegisterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Register::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['email'] = $data->getEmail(); + $dataArray['password'] = $data->getPassword(); + if ($data->isInitialized('language') && null !== $data->getLanguage()) { + $dataArray['language'] = $data->getLanguage(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Register::class === get_class($data); + if ($data->isInitialized('authenticate') && null !== $data->getAuthenticate()) { + $dataArray['authenticate'] = $data->getAuthenticate(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Register(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - if (\array_key_exists('language', $data)) { - $object->setLanguage($data['language']); - unset($data['language']); - } - if (\array_key_exists('authenticate', $data)) { - $object->setAuthenticate($data['authenticate']); - unset($data['authenticate']); - } - if (\array_key_exists('group_invitation_token', $data)) { - $object->setGroupInvitationToken($data['group_invitation_token']); - unset($data['group_invitation_token']); - } - if (\array_key_exists('workspace_invitation_token', $data)) { - $object->setWorkspaceInvitationToken($data['workspace_invitation_token']); - unset($data['workspace_invitation_token']); - } - if (\array_key_exists('template_id', $data)) { - $object->setTemplateId($data['template_id']); - unset($data['template_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('groupInvitationToken') && null !== $data->getGroupInvitationToken()) { + $dataArray['group_invitation_token'] = $data->getGroupInvitationToken(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['email'] = $object->getEmail(); - $data['password'] = $object->getPassword(); - if ($object->isInitialized('language') && null !== $object->getLanguage()) { - $data['language'] = $object->getLanguage(); - } - if ($object->isInitialized('authenticate') && null !== $object->getAuthenticate()) { - $data['authenticate'] = $object->getAuthenticate(); - } - if ($object->isInitialized('groupInvitationToken') && null !== $object->getGroupInvitationToken()) { - $data['group_invitation_token'] = $object->getGroupInvitationToken(); - } - if ($object->isInitialized('workspaceInvitationToken') && null !== $object->getWorkspaceInvitationToken()) { - $data['workspace_invitation_token'] = $object->getWorkspaceInvitationToken(); - } - if ($object->isInitialized('templateId') && null !== $object->getTemplateId()) { - $data['template_id'] = $object->getTemplateId(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('workspaceInvitationToken') && null !== $data->getWorkspaceInvitationToken()) { + $dataArray['workspace_invitation_token'] = $data->getWorkspaceInvitationToken(); + } + if ($data->isInitialized('templateId') && null !== $data->getTemplateId()) { + $dataArray['template_id'] = $data->getTemplateId(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Register::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Register::class => false]; } } diff --git a/generated/Normalizer/RelatedFieldsNormalizer.php b/generated/Normalizer/RelatedFieldsNormalizer.php index 761f62e..65bb599 100644 --- a/generated/Normalizer/RelatedFieldsNormalizer.php +++ b/generated/Normalizer/RelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,135 +20,66 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RelatedFields(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - - return $data; - } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RelatedFields::class => false]; + $object->setRelatedFields($values); + unset($data['related_fields']); } - } -} else { - class RelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RelatedFields::class === $type; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RelatedFields::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RelatedFields::class => false]; } } diff --git a/generated/Normalizer/RepeatElementCreateElementNormalizer.php b/generated/Normalizer/RepeatElementCreateElementNormalizer.php index a0ee8c8..c7d8f50 100644 --- a/generated/Normalizer/RepeatElementCreateElementNormalizer.php +++ b/generated/Normalizer/RepeatElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,607 +20,302 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RepeatElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RepeatElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - if (\array_key_exists('items_per_row', $data)) { - $object->setItemsPerRow($data['items_per_row']); - unset($data['items_per_row']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); - } - if ($object->isInitialized('itemsPerRow') && null !== $object->getItemsPerRow()) { - $data['items_per_row'] = $object->getItemsPerRow(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + if (\array_key_exists('items_per_page', $data)) { + $object->setItemsPerPage($data['items_per_page']); + unset($data['items_per_page']); + } + if (\array_key_exists('button_load_more_label', $data)) { + $object->setButtonLoadMoreLabel($data['button_load_more_label']); + unset($data['button_load_more_label']); + } + if (\array_key_exists('orientation', $data)) { + $object->setOrientation($data['orientation']); + unset($data['orientation']); + } + if (\array_key_exists('items_per_row', $data)) { + $object->setItemsPerRow($data['items_per_row']); + unset($data['items_per_row']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => false]; - } + return $object; } -} else { - class RepeatElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - if (\array_key_exists('items_per_row', $data)) { - $object->setItemsPerRow($data['items_per_row']); - unset($data['items_per_row']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); - } - if ($object->isInitialized('itemsPerRow') && null !== $object->getItemsPerRow()) { - $data['items_per_row'] = $object->getItemsPerRow(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); + } + if ($data->isInitialized('itemsPerPage') && null !== $data->getItemsPerPage()) { + $dataArray['items_per_page'] = $data->getItemsPerPage(); + } + if ($data->isInitialized('buttonLoadMoreLabel') && null !== $data->getButtonLoadMoreLabel()) { + $dataArray['button_load_more_label'] = $data->getButtonLoadMoreLabel(); + } + if ($data->isInitialized('orientation') && null !== $data->getOrientation()) { + $dataArray['orientation'] = $data->getOrientation(); + } + if ($data->isInitialized('itemsPerRow') && null !== $data->getItemsPerRow()) { + $dataArray['items_per_row'] = $data->getItemsPerRow(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RepeatElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/RepeatElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/RepeatElementCreateElementStyleBackgroundFileNormalizer.php index d45181e..f6d0dd7 100644 --- a/generated/Normalizer/RepeatElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/RepeatElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RepeatElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RepeatElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class RepeatElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RepeatElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/RepeatElementElementNormalizer.php b/generated/Normalizer/RepeatElementElementNormalizer.php index 79c4cd3..f5db30a 100644 --- a/generated/Normalizer/RepeatElementElementNormalizer.php +++ b/generated/Normalizer/RepeatElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,637 +20,317 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RepeatElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RepeatElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - if (\array_key_exists('items_per_row', $data)) { - $object->setItemsPerRow($data['items_per_row']); - unset($data['items_per_row']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); - } - if ($object->isInitialized('itemsPerRow') && null !== $object->getItemsPerRow()) { - $data['items_per_row'] = $object->getItemsPerRow(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + if (\array_key_exists('items_per_page', $data)) { + $object->setItemsPerPage($data['items_per_page']); + unset($data['items_per_page']); + } + if (\array_key_exists('button_load_more_label', $data)) { + $object->setButtonLoadMoreLabel($data['button_load_more_label']); + unset($data['button_load_more_label']); + } + if (\array_key_exists('orientation', $data)) { + $object->setOrientation($data['orientation']); + unset($data['orientation']); + } + if (\array_key_exists('items_per_row', $data)) { + $object->setItemsPerRow($data['items_per_row']); + unset($data['items_per_row']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => false]; - } + return $object; } -} else { - class RepeatElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - if (\array_key_exists('items_per_row', $data)) { - $object->setItemsPerRow($data['items_per_row']); - unset($data['items_per_row']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); - } - if ($object->isInitialized('itemsPerRow') && null !== $object->getItemsPerRow()) { - $data['items_per_row'] = $object->getItemsPerRow(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); + } + if ($data->isInitialized('itemsPerPage') && null !== $data->getItemsPerPage()) { + $dataArray['items_per_page'] = $data->getItemsPerPage(); + } + if ($data->isInitialized('buttonLoadMoreLabel') && null !== $data->getButtonLoadMoreLabel()) { + $dataArray['button_load_more_label'] = $data->getButtonLoadMoreLabel(); + } + if ($data->isInitialized('orientation') && null !== $data->getOrientation()) { + $dataArray['orientation'] = $data->getOrientation(); + } + if ($data->isInitialized('itemsPerRow') && null !== $data->getItemsPerRow()) { + $dataArray['items_per_row'] = $data->getItemsPerRow(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RepeatElementElement::class => false]; } } diff --git a/generated/Normalizer/RepeatElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/RepeatElementElementStyleBackgroundFileNormalizer.php index 2b11a79..ee0a9ca 100644 --- a/generated/Normalizer/RepeatElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/RepeatElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RepeatElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RepeatElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class RepeatElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RepeatElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/RepeatElementPublicElementNormalizer.php b/generated/Normalizer/RepeatElementPublicElementNormalizer.php index b7ccae7..fa69c4d 100644 --- a/generated/Normalizer/RepeatElementPublicElementNormalizer.php +++ b/generated/Normalizer/RepeatElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,629 +20,313 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RepeatElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RepeatElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - if (\array_key_exists('items_per_row', $data)) { - $object->setItemsPerRow($data['items_per_row']); - unset($data['items_per_row']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); - } - if ($object->isInitialized('itemsPerRow') && null !== $object->getItemsPerRow()) { - $data['items_per_row'] = $object->getItemsPerRow(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + if (\array_key_exists('items_per_page', $data)) { + $object->setItemsPerPage($data['items_per_page']); + unset($data['items_per_page']); + } + if (\array_key_exists('button_load_more_label', $data)) { + $object->setButtonLoadMoreLabel($data['button_load_more_label']); + unset($data['button_load_more_label']); + } + if (\array_key_exists('orientation', $data)) { + $object->setOrientation($data['orientation']); + unset($data['orientation']); + } + if (\array_key_exists('items_per_row', $data)) { + $object->setItemsPerRow($data['items_per_row']); + unset($data['items_per_row']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => false]; - } + return $object; } -} else { - class RepeatElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - if (\array_key_exists('items_per_row', $data)) { - $object->setItemsPerRow($data['items_per_row']); - unset($data['items_per_row']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); - } - if ($object->isInitialized('itemsPerRow') && null !== $object->getItemsPerRow()) { - $data['items_per_row'] = $object->getItemsPerRow(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); + } + if ($data->isInitialized('itemsPerPage') && null !== $data->getItemsPerPage()) { + $dataArray['items_per_page'] = $data->getItemsPerPage(); + } + if ($data->isInitialized('buttonLoadMoreLabel') && null !== $data->getButtonLoadMoreLabel()) { + $dataArray['button_load_more_label'] = $data->getButtonLoadMoreLabel(); + } + if ($data->isInitialized('orientation') && null !== $data->getOrientation()) { + $dataArray['orientation'] = $data->getOrientation(); + } + if ($data->isInitialized('itemsPerRow') && null !== $data->getItemsPerRow()) { + $dataArray['items_per_row'] = $data->getItemsPerRow(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RepeatElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/RepeatElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/RepeatElementPublicElementStyleBackgroundFileNormalizer.php index 8a146bb..4f3f6aa 100644 --- a/generated/Normalizer/RepeatElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/RepeatElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RepeatElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RepeatElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class RepeatElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RepeatElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/RepeatElementUpdateElementNormalizer.php b/generated/Normalizer/RepeatElementUpdateElementNormalizer.php index 9867e6e..82b8e54 100644 --- a/generated/Normalizer/RepeatElementUpdateElementNormalizer.php +++ b/generated/Normalizer/RepeatElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,575 +20,286 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RepeatElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RepeatElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - if (\array_key_exists('items_per_row', $data)) { - $object->setItemsPerRow($data['items_per_row']); - unset($data['items_per_row']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); - } - if ($object->isInitialized('itemsPerRow') && null !== $object->getItemsPerRow()) { - $data['items_per_row'] = $object->getItemsPerRow(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + if (\array_key_exists('items_per_page', $data)) { + $object->setItemsPerPage($data['items_per_page']); + unset($data['items_per_page']); + } + if (\array_key_exists('button_load_more_label', $data)) { + $object->setButtonLoadMoreLabel($data['button_load_more_label']); + unset($data['button_load_more_label']); + } + if (\array_key_exists('orientation', $data)) { + $object->setOrientation($data['orientation']); + unset($data['orientation']); + } + if (\array_key_exists('items_per_row', $data)) { + $object->setItemsPerRow($data['items_per_row']); + unset($data['items_per_row']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => false]; - } + return $object; } -} else { - class RepeatElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - if (\array_key_exists('items_per_row', $data)) { - $object->setItemsPerRow($data['items_per_row']); - unset($data['items_per_row']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); - } - if ($object->isInitialized('itemsPerRow') && null !== $object->getItemsPerRow()) { - $data['items_per_row'] = $object->getItemsPerRow(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); + } + if ($data->isInitialized('itemsPerPage') && null !== $data->getItemsPerPage()) { + $dataArray['items_per_page'] = $data->getItemsPerPage(); + } + if ($data->isInitialized('buttonLoadMoreLabel') && null !== $data->getButtonLoadMoreLabel()) { + $dataArray['button_load_more_label'] = $data->getButtonLoadMoreLabel(); + } + if ($data->isInitialized('orientation') && null !== $data->getOrientation()) { + $dataArray['orientation'] = $data->getOrientation(); + } + if ($data->isInitialized('itemsPerRow') && null !== $data->getItemsPerRow()) { + $dataArray['items_per_row'] = $data->getItemsPerRow(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/RepeatElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/RepeatElementUpdateElementStyleBackgroundFileNormalizer.php index 8d3d5ee..a9ea8c9 100644 --- a/generated/Normalizer/RepeatElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/RepeatElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RepeatElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RepeatElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class RepeatElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RepeatElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/ReportNormalizer.php b/generated/Normalizer/ReportNormalizer.php index 51e1a14..9f257f9 100644 --- a/generated/Normalizer/ReportNormalizer.php +++ b/generated/Normalizer/ReportNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,67 +20,39 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Report::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Report::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Report::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Report::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Report(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('failing_rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['failing_rows'] as $key => $value) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; - } - $object->setFailingRows($values); - unset($data['failing_rows']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Report(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getFailingRows() as $key => $value) { - $values_1 = []; + if (\array_key_exists('failing_rows', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['failing_rows'] as $key => $value) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($value as $key_1 => $value_1) { $values_2 = []; foreach ($value_1 as $value_2) { @@ -91,107 +62,45 @@ public function normalize(mixed $object, ?string $format = null, array $context } $values[$key] = $values_1; } - $data['failing_rows'] = $values; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $object->setFailingRows($values); + unset($data['failing_rows']); + } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Report::class => false]; - } + return $object; } -} else { - class ReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Report::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Report::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Report(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('failing_rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['failing_rows'] as $key => $value) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; - } - $object->setFailingRows($values); - unset($data['failing_rows']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getFailingRows() as $key => $value) { + $values_1 = []; + foreach ($value as $key_1 => $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; } + $values_1[$key_1] = $values_2; } - - return $object; + $values[$key] = $values_1; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFailingRows() as $key => $value) { - $values_1 = []; - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; + $dataArray['failing_rows'] = $values; + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $dataArray[$key_2] = $value_3; } - $data['failing_rows'] = $values; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Report::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Report::class => false]; } } diff --git a/generated/Normalizer/ResetPasswordBodyValidationNormalizer.php b/generated/Normalizer/ResetPasswordBodyValidationNormalizer.php index 9bf2854..dcc29fd 100644 --- a/generated/Normalizer/ResetPasswordBodyValidationNormalizer.php +++ b/generated/Normalizer/ResetPasswordBodyValidationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ResetPasswordBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ResetPasswordBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['token'] = $object->getToken(); - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => false]; + if (\array_key_exists('password', $data)) { + $object->setPassword($data['password']); + unset($data['password']); } - } -} else { - class ResetPasswordBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['token'] = $data->getToken(); + $dataArray['password'] = $data->getPassword(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['token'] = $object->getToken(); - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ResetPasswordBodyValidation::class => false]; } } diff --git a/generated/Normalizer/RestoreSnapshotJobCreateJobNormalizer.php b/generated/Normalizer/RestoreSnapshotJobCreateJobNormalizer.php index 2cb93f5..c3e008a 100644 --- a/generated/Normalizer/RestoreSnapshotJobCreateJobNormalizer.php +++ b/generated/Normalizer/RestoreSnapshotJobCreateJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RestoreSnapshotJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RestoreSnapshotJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => false]; - } + return $object; } -} else { - class RestoreSnapshotJobCreateJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobCreateJob::class => false]; } } diff --git a/generated/Normalizer/RestoreSnapshotJobJobNormalizer.php b/generated/Normalizer/RestoreSnapshotJobJobNormalizer.php index 0a71b3b..6f49031 100644 --- a/generated/Normalizer/RestoreSnapshotJobJobNormalizer.php +++ b/generated/Normalizer/RestoreSnapshotJobJobNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,169 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RestoreSnapshotJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RestoreSnapshotJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class RestoreSnapshotJobJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RestoreSnapshotJobJob::class => false]; } } diff --git a/generated/Normalizer/RollupFieldCreateFieldNormalizer.php b/generated/Normalizer/RollupFieldCreateFieldNormalizer.php index 8af70d5..3210436 100644 --- a/generated/Normalizer/RollupFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/RollupFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,391 +20,203 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RollupFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RollupFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('rollup_function', $data)) { - $object->setRollupFunction($data['rollup_function']); - unset($data['rollup_function']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('rollupFunction') && null !== $object->getRollupFunction()) { - $data['rollup_function'] = $object->getRollupFunction(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { + $object->setTargetFieldId($data['target_field_id']); + unset($data['target_field_id']); + } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { + $object->setTargetFieldId(null); + } + if (\array_key_exists('rollup_function', $data)) { + $object->setRollupFunction($data['rollup_function']); + unset($data['rollup_function']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => false]; - } + return $object; } -} else { - class RollupFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class === get_class($data); + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('rollup_function', $data)) { - $object->setRollupFunction($data['rollup_function']); - unset($data['rollup_function']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('rollupFunction') && null !== $object->getRollupFunction()) { - $data['rollup_function'] = $object->getRollupFunction(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('targetFieldId') && null !== $data->getTargetFieldId()) { + $dataArray['target_field_id'] = $data->getTargetFieldId(); + } + if ($data->isInitialized('rollupFunction') && null !== $data->getRollupFunction()) { + $dataArray['rollup_function'] = $data->getRollupFunction(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RollupFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/RollupFieldFieldNormalizer.php b/generated/Normalizer/RollupFieldFieldNormalizer.php index 2f2d8c3..a51e363 100644 --- a/generated/Normalizer/RollupFieldFieldNormalizer.php +++ b/generated/Normalizer/RollupFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,437 +20,232 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RollupFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RollupFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RollupFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RollupFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('rollup_function', $data)) { - $object->setRollupFunction($data['rollup_function']); - unset($data['rollup_function']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('rollupFunction') && null !== $object->getRollupFunction()) { - $data['rollup_function'] = $object->getRollupFunction(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { + $object->setTargetFieldId($data['target_field_id']); + unset($data['target_field_id']); + } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { + $object->setTargetFieldId(null); + } + if (\array_key_exists('rollup_function', $data)) { + $object->setRollupFunction($data['rollup_function']); + unset($data['rollup_function']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RollupFieldField::class => false]; - } + return $object; } -} else { - class RollupFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RollupFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('rollup_function', $data)) { - $object->setRollupFunction($data['rollup_function']); - unset($data['rollup_function']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('rollupFunction') && null !== $object->getRollupFunction()) { - $data['rollup_function'] = $object->getRollupFunction(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('targetFieldId') && null !== $data->getTargetFieldId()) { + $dataArray['target_field_id'] = $data->getTargetFieldId(); + } + if ($data->isInitialized('rollupFunction') && null !== $data->getRollupFunction()) { + $dataArray['rollup_function'] = $data->getRollupFunction(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RollupFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RollupFieldField::class => false]; } } diff --git a/generated/Normalizer/RollupFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/RollupFieldFieldSerializerWithRelatedFieldsNormalizer.php index 55d6f64..87634f0 100644 --- a/generated/Normalizer/RollupFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/RollupFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,453 +20,240 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RollupFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RollupFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('rollup_function', $data)) { - $object->setRollupFunction($data['rollup_function']); - unset($data['rollup_function']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('rollupFunction') && null !== $object->getRollupFunction()) { - $data['rollup_function'] = $object->getRollupFunction(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { + $object->setTargetFieldId($data['target_field_id']); + unset($data['target_field_id']); + } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { + $object->setTargetFieldId(null); + } + if (\array_key_exists('rollup_function', $data)) { + $object->setRollupFunction($data['rollup_function']); + unset($data['rollup_function']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class RollupFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('rollup_function', $data)) { - $object->setRollupFunction($data['rollup_function']); - unset($data['rollup_function']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('rollupFunction') && null !== $object->getRollupFunction()) { - $data['rollup_function'] = $object->getRollupFunction(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('targetFieldId') && null !== $data->getTargetFieldId()) { + $dataArray['target_field_id'] = $data->getTargetFieldId(); + } + if ($data->isInitialized('rollupFunction') && null !== $data->getRollupFunction()) { + $dataArray['rollup_function'] = $data->getRollupFunction(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RollupFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/RollupFieldUpdateFieldNormalizer.php b/generated/Normalizer/RollupFieldUpdateFieldNormalizer.php index b63a426..5c622e7 100644 --- a/generated/Normalizer/RollupFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/RollupFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,399 +20,207 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RollupFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RollupFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('rollup_function', $data)) { - $object->setRollupFunction($data['rollup_function']); - unset($data['rollup_function']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('rollupFunction') && null !== $object->getRollupFunction()) { - $data['rollup_function'] = $object->getRollupFunction(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { + $object->setThroughFieldId($data['through_field_id']); + unset($data['through_field_id']); + } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { + $object->setThroughFieldId(null); + } + if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { + $object->setTargetFieldId($data['target_field_id']); + unset($data['target_field_id']); + } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { + $object->setTargetFieldId(null); + } + if (\array_key_exists('rollup_function', $data)) { + $object->setRollupFunction($data['rollup_function']); + unset($data['rollup_function']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => false]; - } + return $object; } -} else { - class RollupFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('through_field_id', $data) && null !== $data['through_field_id']) { - $object->setThroughFieldId($data['through_field_id']); - unset($data['through_field_id']); - } elseif (\array_key_exists('through_field_id', $data) && null === $data['through_field_id']) { - $object->setThroughFieldId(null); - } - if (\array_key_exists('target_field_id', $data) && null !== $data['target_field_id']) { - $object->setTargetFieldId($data['target_field_id']); - unset($data['target_field_id']); - } elseif (\array_key_exists('target_field_id', $data) && null === $data['target_field_id']) { - $object->setTargetFieldId(null); - } - if (\array_key_exists('rollup_function', $data)) { - $object->setRollupFunction($data['rollup_function']); - unset($data['rollup_function']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - if ($object->isInitialized('throughFieldId') && null !== $object->getThroughFieldId()) { - $data['through_field_id'] = $object->getThroughFieldId(); - } - if ($object->isInitialized('targetFieldId') && null !== $object->getTargetFieldId()) { - $data['target_field_id'] = $object->getTargetFieldId(); - } - if ($object->isInitialized('rollupFunction') && null !== $object->getRollupFunction()) { - $data['rollup_function'] = $object->getRollupFunction(); - } - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); + } + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); + } + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); + } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + if ($data->isInitialized('throughFieldId') && null !== $data->getThroughFieldId()) { + $dataArray['through_field_id'] = $data->getThroughFieldId(); + } + if ($data->isInitialized('targetFieldId') && null !== $data->getTargetFieldId()) { + $dataArray['target_field_id'] = $data->getTargetFieldId(); + } + if ($data->isInitialized('rollupFunction') && null !== $data->getRollupFunction()) { + $dataArray['rollup_function'] = $data->getRollupFunction(); + } + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RollupFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/RowCommentCreateNormalizer.php b/generated/Normalizer/RowCommentCreateNormalizer.php index 4252dfd..7ab12cd 100644 --- a/generated/Normalizer/RowCommentCreateNormalizer.php +++ b/generated/Normalizer/RowCommentCreateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RowCommentCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RowCommentCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowCommentCreate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RowCommentCreate(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['message'] = $object->getMessage(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('message', $data)) { + $object->setMessage($data['message']); + unset($data['message']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => false]; - } + return $object; } -} else { - class RowCommentCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowCommentCreate::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowCommentCreate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['message'] = $data->getMessage(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['message'] = $object->getMessage(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RowCommentCreate::class => false]; } } diff --git a/generated/Normalizer/RowCommentNormalizer.php b/generated/Normalizer/RowCommentNormalizer.php index e0ffa4b..3196978 100644 --- a/generated/Normalizer/RowCommentNormalizer.php +++ b/generated/Normalizer/RowCommentNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,217 +20,110 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RowCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RowCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RowComment::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowComment::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowComment::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowComment::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowComment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { - $object->setUserId($data['user_id']); - unset($data['user_id']); - } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { - $object->setUserId(null); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('updated_on', $data)) { - $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); - unset($data['updated_on']); - } - if (\array_key_exists('edited', $data)) { - $object->setEdited($data['edited']); - unset($data['edited']); - } - if (\array_key_exists('trashed', $data)) { - $object->setTrashed($data['trashed']); - unset($data['trashed']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RowComment(); + if (\array_key_exists('trashed', $data) && \is_int($data['trashed'])) { + $data['trashed'] = (bool) $data['trashed']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('trashed') && null !== $object->getTrashed()) { - $data['trashed'] = $object->getTrashed(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { + $object->setUserId($data['user_id']); + unset($data['user_id']); + } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { + $object->setUserId(null); + } + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('row_id', $data)) { + $object->setRowId($data['row_id']); + unset($data['row_id']); + } + if (\array_key_exists('message', $data)) { + $object->setMessage($data['message']); + unset($data['message']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('updated_on', $data)) { + $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); + unset($data['updated_on']); + } + if (\array_key_exists('edited', $data)) { + $object->setEdited($data['edited']); + unset($data['edited']); + } + if (\array_key_exists('trashed', $data)) { + $object->setTrashed($data['trashed']); + unset($data['trashed']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowComment::class => false]; - } + return $object; } -} else { - class RowCommentNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowComment::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowComment::class === get_class($data); + $dataArray['row_id'] = $data->getRowId(); + if ($data->isInitialized('trashed') && null !== $data->getTrashed()) { + $dataArray['trashed'] = $data->getTrashed(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowComment(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('user_id', $data) && null !== $data['user_id']) { - $object->setUserId($data['user_id']); - unset($data['user_id']); - } elseif (\array_key_exists('user_id', $data) && null === $data['user_id']) { - $object->setUserId(null); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('row_id', $data)) { - $object->setRowId($data['row_id']); - unset($data['row_id']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('updated_on', $data)) { - $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); - unset($data['updated_on']); - } - if (\array_key_exists('edited', $data)) { - $object->setEdited($data['edited']); - unset($data['edited']); - } - if (\array_key_exists('trashed', $data)) { - $object->setTrashed($data['trashed']); - unset($data['trashed']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - $data['row_id'] = $object->getRowId(); - if ($object->isInitialized('trashed') && null !== $object->getTrashed()) { - $data['trashed'] = $object->getTrashed(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowComment::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RowComment::class => false]; } } diff --git a/generated/Normalizer/RowCommentsNotificationModeNormalizer.php b/generated/Normalizer/RowCommentsNotificationModeNormalizer.php index 8e968ae..15e0521 100644 --- a/generated/Normalizer/RowCommentsNotificationModeNormalizer.php +++ b/generated/Normalizer/RowCommentsNotificationModeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RowCommentsNotificationModeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RowCommentsNotificationModeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['mode'] = $object->getMode(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('mode', $data)) { + $object->setMode($data['mode']); + unset($data['mode']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => false]; - } + return $object; } -} else { - class RowCommentsNotificationModeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('mode', $data)) { - $object->setMode($data['mode']); - unset($data['mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['mode'] = $data->getMode(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['mode'] = $object->getMode(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RowCommentsNotificationMode::class => false]; } } diff --git a/generated/Normalizer/RowHistoryNormalizer.php b/generated/Normalizer/RowHistoryNormalizer.php index e6f52f7..03f07d7 100644 --- a/generated/Normalizer/RowHistoryNormalizer.php +++ b/generated/Normalizer/RowHistoryNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,187 +20,92 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RowHistoryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RowHistoryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RowHistory::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowHistory::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowHistory::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowHistory::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowHistory(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('action_type', $data)) { - $object->setActionType($data['action_type']); - unset($data['action_type']); - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('timestamp', $data)) { - $object->setTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['timestamp'])); - unset($data['timestamp']); - } - if (\array_key_exists('before', $data)) { - $object->setBefore($data['before']); - unset($data['before']); - } - if (\array_key_exists('after', $data)) { - $object->setAfter($data['after']); - unset($data['after']); - } - if (\array_key_exists('fields_metadata', $data)) { - $object->setFieldsMetadata($data['fields_metadata']); - unset($data['fields_metadata']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RowHistory(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['action_type'] = $object->getActionType(); - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - $data['timestamp'] = $object->getTimestamp()?->format('Y-m-d\TH:i:sP'); - $data['before'] = $object->getBefore(); - $data['after'] = $object->getAfter(); - $data['fields_metadata'] = $object->getFieldsMetadata(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowHistory::class => false]; + if (\array_key_exists('action_type', $data)) { + $object->setActionType($data['action_type']); + unset($data['action_type']); } - } -} else { - class RowHistoryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowHistory::class === $type; + if (\array_key_exists('user', $data)) { + $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class, 'json', $context)); + unset($data['user']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowHistory::class === get_class($data); + if (\array_key_exists('timestamp', $data)) { + $object->setTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['timestamp'])); + unset($data['timestamp']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowHistory(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('action_type', $data)) { - $object->setActionType($data['action_type']); - unset($data['action_type']); - } - if (\array_key_exists('user', $data)) { - $object->setUser($this->denormalizer->denormalize($data['user'], \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class, 'json', $context)); - unset($data['user']); - } - if (\array_key_exists('timestamp', $data)) { - $object->setTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['timestamp'])); - unset($data['timestamp']); - } - if (\array_key_exists('before', $data)) { - $object->setBefore($data['before']); - unset($data['before']); - } - if (\array_key_exists('after', $data)) { - $object->setAfter($data['after']); - unset($data['after']); - } - if (\array_key_exists('fields_metadata', $data)) { - $object->setFieldsMetadata($data['fields_metadata']); - unset($data['fields_metadata']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('before', $data)) { + $object->setBefore($data['before']); + unset($data['before']); + } + if (\array_key_exists('after', $data)) { + $object->setAfter($data['after']); + unset($data['after']); + } + if (\array_key_exists('fields_metadata', $data)) { + $object->setFieldsMetadata($data['fields_metadata']); + unset($data['fields_metadata']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['action_type'] = $object->getActionType(); - $data['user'] = $this->normalizer->normalize($object->getUser(), 'json', $context); - $data['timestamp'] = $object->getTimestamp()?->format('Y-m-d\TH:i:sP'); - $data['before'] = $object->getBefore(); - $data['after'] = $object->getAfter(); - $data['fields_metadata'] = $object->getFieldsMetadata(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['action_type'] = $data->getActionType(); + $dataArray['user'] = $this->normalizer->normalize($data->getUser(), 'json', $context); + $dataArray['timestamp'] = $data->getTimestamp()?->format('Y-m-d\TH:i:sP'); + $dataArray['before'] = $data->getBefore(); + $dataArray['after'] = $data->getAfter(); + $dataArray['fields_metadata'] = $data->getFieldsMetadata(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowHistory::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RowHistory::class => false]; } } diff --git a/generated/Normalizer/RowHistoryUserNormalizer.php b/generated/Normalizer/RowHistoryUserNormalizer.php index 7511b99..e465646 100644 --- a/generated/Normalizer/RowHistoryUserNormalizer.php +++ b/generated/Normalizer/RowHistoryUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RowHistoryUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RowHistoryUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowHistoryUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RowHistoryUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class RowHistoryUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowHistoryUser::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowHistoryUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RowHistoryUser::class => false]; } } diff --git a/generated/Normalizer/RowMetadataNormalizer.php b/generated/Normalizer/RowMetadataNormalizer.php index 3e7b71e..a0e5242 100644 --- a/generated/Normalizer/RowMetadataNormalizer.php +++ b/generated/Normalizer/RowMetadataNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RowMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RowMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RowMetadata::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowMetadata::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowMetadata::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowMetadata::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowMetadata(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('row_comment_count', $data)) { - $object->setRowCommentCount($data['row_comment_count']); - unset($data['row_comment_count']); - } - if (\array_key_exists('row_comments_notification_mode', $data)) { - $object->setRowCommentsNotificationMode($data['row_comments_notification_mode']); - unset($data['row_comments_notification_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RowMetadata(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('rowCommentCount') && null !== $object->getRowCommentCount()) { - $data['row_comment_count'] = $object->getRowCommentCount(); - } - if ($object->isInitialized('rowCommentsNotificationMode') && null !== $object->getRowCommentsNotificationMode()) { - $data['row_comments_notification_mode'] = $object->getRowCommentsNotificationMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('row_comment_count', $data)) { + $object->setRowCommentCount($data['row_comment_count']); + unset($data['row_comment_count']); + } + if (\array_key_exists('row_comments_notification_mode', $data)) { + $object->setRowCommentsNotificationMode($data['row_comments_notification_mode']); + unset($data['row_comments_notification_mode']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowMetadata::class => false]; - } + return $object; } -} else { - class RowMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowMetadata::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('rowCommentCount') && null !== $data->getRowCommentCount()) { + $dataArray['row_comment_count'] = $data->getRowCommentCount(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowMetadata::class === get_class($data); + if ($data->isInitialized('rowCommentsNotificationMode') && null !== $data->getRowCommentsNotificationMode()) { + $dataArray['row_comments_notification_mode'] = $data->getRowCommentsNotificationMode(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowMetadata(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('row_comment_count', $data)) { - $object->setRowCommentCount($data['row_comment_count']); - unset($data['row_comment_count']); - } - if (\array_key_exists('row_comments_notification_mode', $data)) { - $object->setRowCommentsNotificationMode($data['row_comments_notification_mode']); - unset($data['row_comments_notification_mode']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('rowCommentCount') && null !== $object->getRowCommentCount()) { - $data['row_comment_count'] = $object->getRowCommentCount(); - } - if ($object->isInitialized('rowCommentsNotificationMode') && null !== $object->getRowCommentsNotificationMode()) { - $data['row_comments_notification_mode'] = $object->getRowCommentsNotificationMode(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowMetadata::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RowMetadata::class => false]; } } diff --git a/generated/Normalizer/RowResponseNormalizer.php b/generated/Normalizer/RowResponseNormalizer.php index 24d95b3..c9d1833 100644 --- a/generated/Normalizer/RowResponseNormalizer.php +++ b/generated/Normalizer/RowResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,143 +20,70 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class RowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class RowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\RowResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\RowResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowResponse::class => false]; - } + return $object; } -} else { - class RowResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\RowResponse::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\RowResponse::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\RowResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\RowResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\RowResponse::class => false]; } } diff --git a/generated/Normalizer/SAMLResponseNormalizer.php b/generated/Normalizer/SAMLResponseNormalizer.php index 9ceb3d6..25c539a 100644 --- a/generated/Normalizer/SAMLResponseNormalizer.php +++ b/generated/Normalizer/SAMLResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SAMLResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SAMLResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SAMLResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SAMLResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SAMLResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SAMLResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SAMLResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('SAMLResponse', $data)) { - $object->setSAMLResponse($data['SAMLResponse']); - unset($data['SAMLResponse']); - } - if (\array_key_exists('RelayState', $data)) { - $object->setRelayState($data['RelayState']); - unset($data['RelayState']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SAMLResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['SAMLResponse'] = $object->getSAMLResponse(); - $data['RelayState'] = $object->getRelayState(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('SAMLResponse', $data)) { + $object->setSAMLResponse($data['SAMLResponse']); + unset($data['SAMLResponse']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SAMLResponse::class => false]; + if (\array_key_exists('RelayState', $data)) { + $object->setRelayState($data['RelayState']); + unset($data['RelayState']); } - } -} else { - class SAMLResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SAMLResponse::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SAMLResponse::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SAMLResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('SAMLResponse', $data)) { - $object->setSAMLResponse($data['SAMLResponse']); - unset($data['SAMLResponse']); - } - if (\array_key_exists('RelayState', $data)) { - $object->setRelayState($data['RelayState']); - unset($data['RelayState']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['SAMLResponse'] = $data->getSAMLResponse(); + $dataArray['RelayState'] = $data->getRelayState(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['SAMLResponse'] = $object->getSAMLResponse(); - $data['RelayState'] = $object->getRelayState(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SAMLResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SAMLResponse::class => false]; } } diff --git a/generated/Normalizer/SamlAuthProviderModelAuthProviderNormalizer.php b/generated/Normalizer/SamlAuthProviderModelAuthProviderNormalizer.php index 9bf81a1..e5c3193 100644 --- a/generated/Normalizer/SamlAuthProviderModelAuthProviderNormalizer.php +++ b/generated/Normalizer/SamlAuthProviderModelAuthProviderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,177 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SamlAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SamlAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data)) { - $object->setDomain($data['domain']); - unset($data['domain']); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - if (\array_key_exists('metadata', $data)) { - $object->setMetadata($data['metadata']); - unset($data['metadata']); - } - if (\array_key_exists('is_verified', $data)) { - $object->setIsVerified($data['is_verified']); - unset($data['is_verified']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider(); + if (\array_key_exists('enabled', $data) && \is_int($data['enabled'])) { + $data['enabled'] = (bool) $data['enabled']; + } + if (\array_key_exists('is_verified', $data) && \is_int($data['is_verified'])) { + $data['is_verified'] = (bool) $data['is_verified']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['domain'] = $object->getDomain(); - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['metadata'] = $object->getMetadata(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class SamlAuthProviderModelAuthProviderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class === $type; + if (\array_key_exists('domain', $data)) { + $object->setDomain($data['domain']); + unset($data['domain']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class === get_class($data); + if (\array_key_exists('enabled', $data)) { + $object->setEnabled($data['enabled']); + unset($data['enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain', $data)) { - $object->setDomain($data['domain']); - unset($data['domain']); - } - if (\array_key_exists('enabled', $data)) { - $object->setEnabled($data['enabled']); - unset($data['enabled']); - } - if (\array_key_exists('metadata', $data)) { - $object->setMetadata($data['metadata']); - unset($data['metadata']); - } - if (\array_key_exists('is_verified', $data)) { - $object->setIsVerified($data['is_verified']); - unset($data['is_verified']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('metadata', $data)) { + $object->setMetadata($data['metadata']); + unset($data['metadata']); + } + if (\array_key_exists('is_verified', $data)) { + $object->setIsVerified($data['is_verified']); + unset($data['is_verified']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['domain'] = $object->getDomain(); - if ($object->isInitialized('enabled') && null !== $object->getEnabled()) { - $data['enabled'] = $object->getEnabled(); - } - $data['metadata'] = $object->getMetadata(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['domain'] = $data->getDomain(); + if ($data->isInitialized('enabled') && null !== $data->getEnabled()) { + $dataArray['enabled'] = $data->getEnabled(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => false]; + $dataArray['metadata'] = $data->getMetadata(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SamlAuthProviderModelAuthProvider::class => false]; } } diff --git a/generated/Normalizer/SelectColorValueProviderConfNormalizer.php b/generated/Normalizer/SelectColorValueProviderConfNormalizer.php index c1fead5..2f5d3d2 100644 --- a/generated/Normalizer/SelectColorValueProviderConfNormalizer.php +++ b/generated/Normalizer/SelectColorValueProviderConfNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SelectColorValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SelectColorValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { - $object->setFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['field_id'] = $object->getFieldId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { + $object->setFieldId($data['field_id']); + unset($data['field_id']); + } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { + $object->setFieldId(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => false]; - } + return $object; } -} else { - class SelectColorValueProviderConfNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('field_id', $data) && null !== $data['field_id']) { - $object->setFieldId($data['field_id']); - unset($data['field_id']); - } elseif (\array_key_exists('field_id', $data) && null === $data['field_id']) { - $object->setFieldId(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['field_id'] = $data->getFieldId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['field_id'] = $object->getFieldId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SelectColorValueProviderConf::class => false]; } } diff --git a/generated/Normalizer/SelectOptionNormalizer.php b/generated/Normalizer/SelectOptionNormalizer.php index c100f0c..db14d54 100644 --- a/generated/Normalizer/SelectOptionNormalizer.php +++ b/generated/Normalizer/SelectOptionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,153 +20,75 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SelectOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SelectOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SelectOption::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SelectOption::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SelectOption::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SelectOption::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SelectOption(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SelectOption(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['id'] = $object->getId(); - } - $data['value'] = $object->getValue(); - $data['color'] = $object->getColor(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SelectOption::class => false]; + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); } - } -} else { - class SelectOptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SelectOption::class === $type; + if (\array_key_exists('color', $data)) { + $object->setColor($data['color']); + unset($data['color']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SelectOption::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SelectOption(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('color', $data)) { - $object->setColor($data['color']); - unset($data['color']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('id') && null !== $data->getId()) { + $dataArray['id'] = $data->getId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['id'] = $object->getId(); - } - $data['value'] = $object->getValue(); - $data['color'] = $object->getColor(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $dataArray['value'] = $data->getValue(); + $dataArray['color'] = $data->getColor(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SelectOption::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SelectOption::class => false]; } } diff --git a/generated/Normalizer/SendResetPasswordEmailBodyValidationNormalizer.php b/generated/Normalizer/SendResetPasswordEmailBodyValidationNormalizer.php index d3e0c82..bcf0cdd 100644 --- a/generated/Normalizer/SendResetPasswordEmailBodyValidationNormalizer.php +++ b/generated/Normalizer/SendResetPasswordEmailBodyValidationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SendResetPasswordEmailBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SendResetPasswordEmailBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('base_url', $data)) { - $object->setBaseUrl($data['base_url']); - unset($data['base_url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['email'] = $object->getEmail(); - $data['base_url'] = $object->getBaseUrl(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => false]; + if (\array_key_exists('base_url', $data)) { + $object->setBaseUrl($data['base_url']); + unset($data['base_url']); } - } -} else { - class SendResetPasswordEmailBodyValidationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('base_url', $data)) { - $object->setBaseUrl($data['base_url']); - unset($data['base_url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['email'] = $data->getEmail(); + $dataArray['base_url'] = $data->getBaseUrl(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['email'] = $object->getEmail(); - $data['base_url'] = $object->getBaseUrl(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SendResetPasswordEmailBodyValidation::class => false]; } } diff --git a/generated/Normalizer/SenderNormalizer.php b/generated/Normalizer/SenderNormalizer.php index 1828c46..9c08699 100644 --- a/generated/Normalizer/SenderNormalizer.php +++ b/generated/Normalizer/SenderNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SenderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SenderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Sender::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Sender::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Sender::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Sender::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Sender(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Sender(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['username'] = $object->getUsername(); - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Sender::class => false]; + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); } - } -} else { - class SenderNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Sender::class === $type; + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Sender::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Sender(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['username'] = $data->getUsername(); + if ($data->isInitialized('firstName') && null !== $data->getFirstName()) { + $dataArray['first_name'] = $data->getFirstName(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['username'] = $object->getUsername(); - if ($object->isInitialized('firstName') && null !== $object->getFirstName()) { - $data['first_name'] = $object->getFirstName(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Sender::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Sender::class => false]; } } diff --git a/generated/Normalizer/SettingsCoBrandingLogoNormalizer.php b/generated/Normalizer/SettingsCoBrandingLogoNormalizer.php index 132e610..15c9d3e 100644 --- a/generated/Normalizer/SettingsCoBrandingLogoNormalizer.php +++ b/generated/Normalizer/SettingsCoBrandingLogoNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SettingsCoBrandingLogoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SettingsCoBrandingLogoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => false]; - } + return $object; } -} else { - class SettingsCoBrandingLogoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class => false]; } } diff --git a/generated/Normalizer/SettingsNormalizer.php b/generated/Normalizer/SettingsNormalizer.php index 6cff59b..7fd29e6 100644 --- a/generated/Normalizer/SettingsNormalizer.php +++ b/generated/Normalizer/SettingsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,295 +20,173 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Settings::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Settings::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Settings::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Settings::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Settings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('allow_new_signups', $data)) { - $object->setAllowNewSignups($data['allow_new_signups']); - unset($data['allow_new_signups']); - } - if (\array_key_exists('allow_signups_via_workspace_invitations', $data)) { - $object->setAllowSignupsViaWorkspaceInvitations($data['allow_signups_via_workspace_invitations']); - unset($data['allow_signups_via_workspace_invitations']); - } - if (\array_key_exists('allow_signups_via_group_invitations', $data)) { - $object->setAllowSignupsViaGroupInvitations($data['allow_signups_via_group_invitations']); - unset($data['allow_signups_via_group_invitations']); - } - if (\array_key_exists('allow_reset_password', $data)) { - $object->setAllowResetPassword($data['allow_reset_password']); - unset($data['allow_reset_password']); - } - if (\array_key_exists('allow_global_workspace_creation', $data)) { - $object->setAllowGlobalWorkspaceCreation($data['allow_global_workspace_creation']); - unset($data['allow_global_workspace_creation']); - } - if (\array_key_exists('allow_global_group_creation', $data)) { - $object->setAllowGlobalGroupCreation($data['allow_global_group_creation']); - unset($data['allow_global_group_creation']); - } - if (\array_key_exists('account_deletion_grace_delay', $data)) { - $object->setAccountDeletionGraceDelay($data['account_deletion_grace_delay']); - unset($data['account_deletion_grace_delay']); - } - if (\array_key_exists('show_admin_signup_page', $data)) { - $object->setShowAdminSignupPage($data['show_admin_signup_page']); - unset($data['show_admin_signup_page']); - } - if (\array_key_exists('track_workspace_usage', $data)) { - $object->setTrackWorkspaceUsage($data['track_workspace_usage']); - unset($data['track_workspace_usage']); - } - if (\array_key_exists('show_baserow_help_request', $data)) { - $object->setShowBaserowHelpRequest($data['show_baserow_help_request']); - unset($data['show_baserow_help_request']); - } - if (\array_key_exists('co_branding_logo', $data) && null !== $data['co_branding_logo']) { - $object->setCoBrandingLogo($this->denormalizer->denormalize($data['co_branding_logo'], \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class, 'json', $context)); - unset($data['co_branding_logo']); - } elseif (\array_key_exists('co_branding_logo', $data) && null === $data['co_branding_logo']) { - $object->setCoBrandingLogo(null); - } - if (\array_key_exists('email_verification', $data) && null !== $data['email_verification']) { - $object->setEmailVerification($data['email_verification']); - unset($data['email_verification']); - } elseif (\array_key_exists('email_verification', $data) && null === $data['email_verification']) { - $object->setEmailVerification(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Settings(); + if (\array_key_exists('allow_new_signups', $data) && \is_int($data['allow_new_signups'])) { + $data['allow_new_signups'] = (bool) $data['allow_new_signups']; + } + if (\array_key_exists('allow_signups_via_workspace_invitations', $data) && \is_int($data['allow_signups_via_workspace_invitations'])) { + $data['allow_signups_via_workspace_invitations'] = (bool) $data['allow_signups_via_workspace_invitations']; + } + if (\array_key_exists('allow_signups_via_group_invitations', $data) && \is_int($data['allow_signups_via_group_invitations'])) { + $data['allow_signups_via_group_invitations'] = (bool) $data['allow_signups_via_group_invitations']; + } + if (\array_key_exists('allow_reset_password', $data) && \is_int($data['allow_reset_password'])) { + $data['allow_reset_password'] = (bool) $data['allow_reset_password']; + } + if (\array_key_exists('allow_global_workspace_creation', $data) && \is_int($data['allow_global_workspace_creation'])) { + $data['allow_global_workspace_creation'] = (bool) $data['allow_global_workspace_creation']; + } + if (\array_key_exists('allow_global_group_creation', $data) && \is_int($data['allow_global_group_creation'])) { + $data['allow_global_group_creation'] = (bool) $data['allow_global_group_creation']; + } + if (\array_key_exists('show_admin_signup_page', $data) && \is_int($data['show_admin_signup_page'])) { + $data['show_admin_signup_page'] = (bool) $data['show_admin_signup_page']; + } + if (\array_key_exists('track_workspace_usage', $data) && \is_int($data['track_workspace_usage'])) { + $data['track_workspace_usage'] = (bool) $data['track_workspace_usage']; + } + if (\array_key_exists('show_baserow_help_request', $data) && \is_int($data['show_baserow_help_request'])) { + $data['show_baserow_help_request'] = (bool) $data['show_baserow_help_request']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('allowNewSignups') && null !== $object->getAllowNewSignups()) { - $data['allow_new_signups'] = $object->getAllowNewSignups(); - } - if ($object->isInitialized('allowSignupsViaWorkspaceInvitations') && null !== $object->getAllowSignupsViaWorkspaceInvitations()) { - $data['allow_signups_via_workspace_invitations'] = $object->getAllowSignupsViaWorkspaceInvitations(); - } - if ($object->isInitialized('allowSignupsViaGroupInvitations') && null !== $object->getAllowSignupsViaGroupInvitations()) { - $data['allow_signups_via_group_invitations'] = $object->getAllowSignupsViaGroupInvitations(); - } - if ($object->isInitialized('allowResetPassword') && null !== $object->getAllowResetPassword()) { - $data['allow_reset_password'] = $object->getAllowResetPassword(); - } - if ($object->isInitialized('allowGlobalWorkspaceCreation') && null !== $object->getAllowGlobalWorkspaceCreation()) { - $data['allow_global_workspace_creation'] = $object->getAllowGlobalWorkspaceCreation(); - } - if ($object->isInitialized('allowGlobalGroupCreation') && null !== $object->getAllowGlobalGroupCreation()) { - $data['allow_global_group_creation'] = $object->getAllowGlobalGroupCreation(); - } - if ($object->isInitialized('accountDeletionGraceDelay') && null !== $object->getAccountDeletionGraceDelay()) { - $data['account_deletion_grace_delay'] = $object->getAccountDeletionGraceDelay(); - } - if ($object->isInitialized('showAdminSignupPage') && null !== $object->getShowAdminSignupPage()) { - $data['show_admin_signup_page'] = $object->getShowAdminSignupPage(); - } - if ($object->isInitialized('trackWorkspaceUsage') && null !== $object->getTrackWorkspaceUsage()) { - $data['track_workspace_usage'] = $object->getTrackWorkspaceUsage(); - } - if ($object->isInitialized('showBaserowHelpRequest') && null !== $object->getShowBaserowHelpRequest()) { - $data['show_baserow_help_request'] = $object->getShowBaserowHelpRequest(); - } - if ($object->isInitialized('coBrandingLogo') && null !== $object->getCoBrandingLogo()) { - $data['co_branding_logo'] = $this->normalizer->normalize($object->getCoBrandingLogo(), 'json', $context); - } - if ($object->isInitialized('emailVerification') && null !== $object->getEmailVerification()) { - $data['email_verification'] = $object->getEmailVerification(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('allow_new_signups', $data)) { + $object->setAllowNewSignups($data['allow_new_signups']); + unset($data['allow_new_signups']); + } + if (\array_key_exists('allow_signups_via_workspace_invitations', $data)) { + $object->setAllowSignupsViaWorkspaceInvitations($data['allow_signups_via_workspace_invitations']); + unset($data['allow_signups_via_workspace_invitations']); + } + if (\array_key_exists('allow_signups_via_group_invitations', $data)) { + $object->setAllowSignupsViaGroupInvitations($data['allow_signups_via_group_invitations']); + unset($data['allow_signups_via_group_invitations']); + } + if (\array_key_exists('allow_reset_password', $data)) { + $object->setAllowResetPassword($data['allow_reset_password']); + unset($data['allow_reset_password']); + } + if (\array_key_exists('allow_global_workspace_creation', $data)) { + $object->setAllowGlobalWorkspaceCreation($data['allow_global_workspace_creation']); + unset($data['allow_global_workspace_creation']); + } + if (\array_key_exists('allow_global_group_creation', $data)) { + $object->setAllowGlobalGroupCreation($data['allow_global_group_creation']); + unset($data['allow_global_group_creation']); + } + if (\array_key_exists('account_deletion_grace_delay', $data)) { + $object->setAccountDeletionGraceDelay($data['account_deletion_grace_delay']); + unset($data['account_deletion_grace_delay']); + } + if (\array_key_exists('show_admin_signup_page', $data)) { + $object->setShowAdminSignupPage($data['show_admin_signup_page']); + unset($data['show_admin_signup_page']); + } + if (\array_key_exists('track_workspace_usage', $data)) { + $object->setTrackWorkspaceUsage($data['track_workspace_usage']); + unset($data['track_workspace_usage']); + } + if (\array_key_exists('show_baserow_help_request', $data)) { + $object->setShowBaserowHelpRequest($data['show_baserow_help_request']); + unset($data['show_baserow_help_request']); + } + if (\array_key_exists('co_branding_logo', $data) && null !== $data['co_branding_logo']) { + $object->setCoBrandingLogo($this->denormalizer->denormalize($data['co_branding_logo'], \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class, 'json', $context)); + unset($data['co_branding_logo']); + } elseif (\array_key_exists('co_branding_logo', $data) && null === $data['co_branding_logo']) { + $object->setCoBrandingLogo(null); + } + if (\array_key_exists('email_verification', $data) && null !== $data['email_verification']) { + $object->setEmailVerification($data['email_verification']); + unset($data['email_verification']); + } elseif (\array_key_exists('email_verification', $data) && null === $data['email_verification']) { + $object->setEmailVerification(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Settings::class => false]; - } + return $object; } -} else { - class SettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Settings::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('allowNewSignups') && null !== $data->getAllowNewSignups()) { + $dataArray['allow_new_signups'] = $data->getAllowNewSignups(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Settings::class === get_class($data); + if ($data->isInitialized('allowSignupsViaWorkspaceInvitations') && null !== $data->getAllowSignupsViaWorkspaceInvitations()) { + $dataArray['allow_signups_via_workspace_invitations'] = $data->getAllowSignupsViaWorkspaceInvitations(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Settings(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('allow_new_signups', $data)) { - $object->setAllowNewSignups($data['allow_new_signups']); - unset($data['allow_new_signups']); - } - if (\array_key_exists('allow_signups_via_workspace_invitations', $data)) { - $object->setAllowSignupsViaWorkspaceInvitations($data['allow_signups_via_workspace_invitations']); - unset($data['allow_signups_via_workspace_invitations']); - } - if (\array_key_exists('allow_signups_via_group_invitations', $data)) { - $object->setAllowSignupsViaGroupInvitations($data['allow_signups_via_group_invitations']); - unset($data['allow_signups_via_group_invitations']); - } - if (\array_key_exists('allow_reset_password', $data)) { - $object->setAllowResetPassword($data['allow_reset_password']); - unset($data['allow_reset_password']); - } - if (\array_key_exists('allow_global_workspace_creation', $data)) { - $object->setAllowGlobalWorkspaceCreation($data['allow_global_workspace_creation']); - unset($data['allow_global_workspace_creation']); - } - if (\array_key_exists('allow_global_group_creation', $data)) { - $object->setAllowGlobalGroupCreation($data['allow_global_group_creation']); - unset($data['allow_global_group_creation']); - } - if (\array_key_exists('account_deletion_grace_delay', $data)) { - $object->setAccountDeletionGraceDelay($data['account_deletion_grace_delay']); - unset($data['account_deletion_grace_delay']); - } - if (\array_key_exists('show_admin_signup_page', $data)) { - $object->setShowAdminSignupPage($data['show_admin_signup_page']); - unset($data['show_admin_signup_page']); - } - if (\array_key_exists('track_workspace_usage', $data)) { - $object->setTrackWorkspaceUsage($data['track_workspace_usage']); - unset($data['track_workspace_usage']); - } - if (\array_key_exists('show_baserow_help_request', $data)) { - $object->setShowBaserowHelpRequest($data['show_baserow_help_request']); - unset($data['show_baserow_help_request']); - } - if (\array_key_exists('co_branding_logo', $data) && null !== $data['co_branding_logo']) { - $object->setCoBrandingLogo($this->denormalizer->denormalize($data['co_branding_logo'], \CedricZiel\Baserow\Generated\Model\SettingsCoBrandingLogo::class, 'json', $context)); - unset($data['co_branding_logo']); - } elseif (\array_key_exists('co_branding_logo', $data) && null === $data['co_branding_logo']) { - $object->setCoBrandingLogo(null); - } - if (\array_key_exists('email_verification', $data) && null !== $data['email_verification']) { - $object->setEmailVerification($data['email_verification']); - unset($data['email_verification']); - } elseif (\array_key_exists('email_verification', $data) && null === $data['email_verification']) { - $object->setEmailVerification(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('allowSignupsViaGroupInvitations') && null !== $data->getAllowSignupsViaGroupInvitations()) { + $dataArray['allow_signups_via_group_invitations'] = $data->getAllowSignupsViaGroupInvitations(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('allowNewSignups') && null !== $object->getAllowNewSignups()) { - $data['allow_new_signups'] = $object->getAllowNewSignups(); - } - if ($object->isInitialized('allowSignupsViaWorkspaceInvitations') && null !== $object->getAllowSignupsViaWorkspaceInvitations()) { - $data['allow_signups_via_workspace_invitations'] = $object->getAllowSignupsViaWorkspaceInvitations(); - } - if ($object->isInitialized('allowSignupsViaGroupInvitations') && null !== $object->getAllowSignupsViaGroupInvitations()) { - $data['allow_signups_via_group_invitations'] = $object->getAllowSignupsViaGroupInvitations(); - } - if ($object->isInitialized('allowResetPassword') && null !== $object->getAllowResetPassword()) { - $data['allow_reset_password'] = $object->getAllowResetPassword(); - } - if ($object->isInitialized('allowGlobalWorkspaceCreation') && null !== $object->getAllowGlobalWorkspaceCreation()) { - $data['allow_global_workspace_creation'] = $object->getAllowGlobalWorkspaceCreation(); - } - if ($object->isInitialized('allowGlobalGroupCreation') && null !== $object->getAllowGlobalGroupCreation()) { - $data['allow_global_group_creation'] = $object->getAllowGlobalGroupCreation(); - } - if ($object->isInitialized('accountDeletionGraceDelay') && null !== $object->getAccountDeletionGraceDelay()) { - $data['account_deletion_grace_delay'] = $object->getAccountDeletionGraceDelay(); - } - if ($object->isInitialized('showAdminSignupPage') && null !== $object->getShowAdminSignupPage()) { - $data['show_admin_signup_page'] = $object->getShowAdminSignupPage(); - } - if ($object->isInitialized('trackWorkspaceUsage') && null !== $object->getTrackWorkspaceUsage()) { - $data['track_workspace_usage'] = $object->getTrackWorkspaceUsage(); - } - if ($object->isInitialized('showBaserowHelpRequest') && null !== $object->getShowBaserowHelpRequest()) { - $data['show_baserow_help_request'] = $object->getShowBaserowHelpRequest(); - } - if ($object->isInitialized('coBrandingLogo') && null !== $object->getCoBrandingLogo()) { - $data['co_branding_logo'] = $this->normalizer->normalize($object->getCoBrandingLogo(), 'json', $context); - } - if ($object->isInitialized('emailVerification') && null !== $object->getEmailVerification()) { - $data['email_verification'] = $object->getEmailVerification(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('allowResetPassword') && null !== $data->getAllowResetPassword()) { + $dataArray['allow_reset_password'] = $data->getAllowResetPassword(); + } + if ($data->isInitialized('allowGlobalWorkspaceCreation') && null !== $data->getAllowGlobalWorkspaceCreation()) { + $dataArray['allow_global_workspace_creation'] = $data->getAllowGlobalWorkspaceCreation(); + } + if ($data->isInitialized('allowGlobalGroupCreation') && null !== $data->getAllowGlobalGroupCreation()) { + $dataArray['allow_global_group_creation'] = $data->getAllowGlobalGroupCreation(); + } + if ($data->isInitialized('accountDeletionGraceDelay') && null !== $data->getAccountDeletionGraceDelay()) { + $dataArray['account_deletion_grace_delay'] = $data->getAccountDeletionGraceDelay(); + } + if ($data->isInitialized('showAdminSignupPage') && null !== $data->getShowAdminSignupPage()) { + $dataArray['show_admin_signup_page'] = $data->getShowAdminSignupPage(); + } + if ($data->isInitialized('trackWorkspaceUsage') && null !== $data->getTrackWorkspaceUsage()) { + $dataArray['track_workspace_usage'] = $data->getTrackWorkspaceUsage(); + } + if ($data->isInitialized('showBaserowHelpRequest') && null !== $data->getShowBaserowHelpRequest()) { + $dataArray['show_baserow_help_request'] = $data->getShowBaserowHelpRequest(); + } + if ($data->isInitialized('coBrandingLogo') && null !== $data->getCoBrandingLogo()) { + $dataArray['co_branding_logo'] = $this->normalizer->normalize($data->getCoBrandingLogo(), 'json', $context); + } + if ($data->isInitialized('emailVerification') && null !== $data->getEmailVerification()) { + $dataArray['email_verification'] = $data->getEmailVerification(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Settings::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Settings::class => false]; } } diff --git a/generated/Normalizer/SingleAuditLogExportJobRequestNormalizer.php b/generated/Normalizer/SingleAuditLogExportJobRequestNormalizer.php index 8748b07..b92141a 100644 --- a/generated/Normalizer/SingleAuditLogExportJobRequestNormalizer.php +++ b/generated/Normalizer/SingleAuditLogExportJobRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,253 +20,128 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleAuditLogExportJobRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleAuditLogExportJobRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_first_row_header', $data)) { - $object->setCsvFirstRowHeader($data['csv_first_row_header']); - unset($data['csv_first_row_header']); - } - if (\array_key_exists('filter_user_id', $data)) { - $object->setFilterUserId($data['filter_user_id']); - unset($data['filter_user_id']); - } - if (\array_key_exists('filter_workspace_id', $data)) { - $object->setFilterWorkspaceId($data['filter_workspace_id']); - unset($data['filter_workspace_id']); - } - if (\array_key_exists('filter_action_type', $data)) { - $object->setFilterActionType($data['filter_action_type']); - unset($data['filter_action_type']); - } - if (\array_key_exists('filter_from_timestamp', $data)) { - $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); - unset($data['filter_from_timestamp']); - } - if (\array_key_exists('filter_to_timestamp', $data)) { - $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); - unset($data['filter_to_timestamp']); - } - if (\array_key_exists('exclude_columns', $data)) { - $object->setExcludeColumns($data['exclude_columns']); - unset($data['exclude_columns']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest(); + if (\array_key_exists('csv_first_row_header', $data) && \is_int($data['csv_first_row_header'])) { + $data['csv_first_row_header'] = (bool) $data['csv_first_row_header']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvFirstRowHeader') && null !== $object->getCsvFirstRowHeader()) { - $data['csv_first_row_header'] = $object->getCsvFirstRowHeader(); - } - if ($object->isInitialized('filterUserId') && null !== $object->getFilterUserId()) { - $data['filter_user_id'] = $object->getFilterUserId(); - } - if ($object->isInitialized('filterWorkspaceId') && null !== $object->getFilterWorkspaceId()) { - $data['filter_workspace_id'] = $object->getFilterWorkspaceId(); - } - if ($object->isInitialized('filterActionType') && null !== $object->getFilterActionType()) { - $data['filter_action_type'] = $object->getFilterActionType(); - } - if ($object->isInitialized('filterFromTimestamp') && null !== $object->getFilterFromTimestamp()) { - $data['filter_from_timestamp'] = $object->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('filterToTimestamp') && null !== $object->getFilterToTimestamp()) { - $data['filter_to_timestamp'] = $object->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('excludeColumns') && null !== $object->getExcludeColumns()) { - $data['exclude_columns'] = $object->getExcludeColumns(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('export_charset', $data)) { + $object->setExportCharset($data['export_charset']); + unset($data['export_charset']); + } + if (\array_key_exists('csv_column_separator', $data)) { + $object->setCsvColumnSeparator($data['csv_column_separator']); + unset($data['csv_column_separator']); + } + if (\array_key_exists('csv_first_row_header', $data)) { + $object->setCsvFirstRowHeader($data['csv_first_row_header']); + unset($data['csv_first_row_header']); + } + if (\array_key_exists('filter_user_id', $data)) { + $object->setFilterUserId($data['filter_user_id']); + unset($data['filter_user_id']); + } + if (\array_key_exists('filter_workspace_id', $data)) { + $object->setFilterWorkspaceId($data['filter_workspace_id']); + unset($data['filter_workspace_id']); + } + if (\array_key_exists('filter_action_type', $data)) { + $object->setFilterActionType($data['filter_action_type']); + unset($data['filter_action_type']); + } + if (\array_key_exists('filter_from_timestamp', $data)) { + $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); + unset($data['filter_from_timestamp']); + } + if (\array_key_exists('filter_to_timestamp', $data)) { + $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); + unset($data['filter_to_timestamp']); + } + if (\array_key_exists('exclude_columns', $data)) { + $object->setExcludeColumns($data['exclude_columns']); + unset($data['exclude_columns']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => false]; - } + return $object; } -} else { - class SingleAuditLogExportJobRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('exportCharset') && null !== $data->getExportCharset()) { + $dataArray['export_charset'] = $data->getExportCharset(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class === get_class($data); + if ($data->isInitialized('csvColumnSeparator') && null !== $data->getCsvColumnSeparator()) { + $dataArray['csv_column_separator'] = $data->getCsvColumnSeparator(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_first_row_header', $data)) { - $object->setCsvFirstRowHeader($data['csv_first_row_header']); - unset($data['csv_first_row_header']); - } - if (\array_key_exists('filter_user_id', $data)) { - $object->setFilterUserId($data['filter_user_id']); - unset($data['filter_user_id']); - } - if (\array_key_exists('filter_workspace_id', $data)) { - $object->setFilterWorkspaceId($data['filter_workspace_id']); - unset($data['filter_workspace_id']); - } - if (\array_key_exists('filter_action_type', $data)) { - $object->setFilterActionType($data['filter_action_type']); - unset($data['filter_action_type']); - } - if (\array_key_exists('filter_from_timestamp', $data)) { - $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); - unset($data['filter_from_timestamp']); - } - if (\array_key_exists('filter_to_timestamp', $data)) { - $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); - unset($data['filter_to_timestamp']); - } - if (\array_key_exists('exclude_columns', $data)) { - $object->setExcludeColumns($data['exclude_columns']); - unset($data['exclude_columns']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('csvFirstRowHeader') && null !== $data->getCsvFirstRowHeader()) { + $dataArray['csv_first_row_header'] = $data->getCsvFirstRowHeader(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvFirstRowHeader') && null !== $object->getCsvFirstRowHeader()) { - $data['csv_first_row_header'] = $object->getCsvFirstRowHeader(); - } - if ($object->isInitialized('filterUserId') && null !== $object->getFilterUserId()) { - $data['filter_user_id'] = $object->getFilterUserId(); - } - if ($object->isInitialized('filterWorkspaceId') && null !== $object->getFilterWorkspaceId()) { - $data['filter_workspace_id'] = $object->getFilterWorkspaceId(); - } - if ($object->isInitialized('filterActionType') && null !== $object->getFilterActionType()) { - $data['filter_action_type'] = $object->getFilterActionType(); - } - if ($object->isInitialized('filterFromTimestamp') && null !== $object->getFilterFromTimestamp()) { - $data['filter_from_timestamp'] = $object->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('filterToTimestamp') && null !== $object->getFilterToTimestamp()) { - $data['filter_to_timestamp'] = $object->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('excludeColumns') && null !== $object->getExcludeColumns()) { - $data['exclude_columns'] = $object->getExcludeColumns(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('filterUserId') && null !== $data->getFilterUserId()) { + $dataArray['filter_user_id'] = $data->getFilterUserId(); + } + if ($data->isInitialized('filterWorkspaceId') && null !== $data->getFilterWorkspaceId()) { + $dataArray['filter_workspace_id'] = $data->getFilterWorkspaceId(); + } + if ($data->isInitialized('filterActionType') && null !== $data->getFilterActionType()) { + $dataArray['filter_action_type'] = $data->getFilterActionType(); + } + if ($data->isInitialized('filterFromTimestamp') && null !== $data->getFilterFromTimestamp()) { + $dataArray['filter_from_timestamp'] = $data->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('filterToTimestamp') && null !== $data->getFilterToTimestamp()) { + $dataArray['filter_to_timestamp'] = $data->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('excludeColumns') && null !== $data->getExcludeColumns()) { + $dataArray['exclude_columns'] = $data->getExcludeColumns(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobRequest::class => false]; } } diff --git a/generated/Normalizer/SingleAuditLogExportJobResponseNormalizer.php b/generated/Normalizer/SingleAuditLogExportJobResponseNormalizer.php index 276e5b3..2fb384e 100644 --- a/generated/Normalizer/SingleAuditLogExportJobResponseNormalizer.php +++ b/generated/Normalizer/SingleAuditLogExportJobResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,269 +20,136 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleAuditLogExportJobResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleAuditLogExportJobResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_first_row_header', $data)) { - $object->setCsvFirstRowHeader($data['csv_first_row_header']); - unset($data['csv_first_row_header']); - } - if (\array_key_exists('filter_user_id', $data)) { - $object->setFilterUserId($data['filter_user_id']); - unset($data['filter_user_id']); - } - if (\array_key_exists('filter_workspace_id', $data)) { - $object->setFilterWorkspaceId($data['filter_workspace_id']); - unset($data['filter_workspace_id']); - } - if (\array_key_exists('filter_action_type', $data)) { - $object->setFilterActionType($data['filter_action_type']); - unset($data['filter_action_type']); - } - if (\array_key_exists('filter_from_timestamp', $data)) { - $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); - unset($data['filter_from_timestamp']); - } - if (\array_key_exists('filter_to_timestamp', $data)) { - $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); - unset($data['filter_to_timestamp']); - } - if (\array_key_exists('exclude_columns', $data)) { - $object->setExcludeColumns($data['exclude_columns']); - unset($data['exclude_columns']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('exported_file_name', $data)) { - $object->setExportedFileName($data['exported_file_name']); - unset($data['exported_file_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse(); + if (\array_key_exists('csv_first_row_header', $data) && \is_int($data['csv_first_row_header'])) { + $data['csv_first_row_header'] = (bool) $data['csv_first_row_header']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvFirstRowHeader') && null !== $object->getCsvFirstRowHeader()) { - $data['csv_first_row_header'] = $object->getCsvFirstRowHeader(); - } - if ($object->isInitialized('filterUserId') && null !== $object->getFilterUserId()) { - $data['filter_user_id'] = $object->getFilterUserId(); - } - if ($object->isInitialized('filterWorkspaceId') && null !== $object->getFilterWorkspaceId()) { - $data['filter_workspace_id'] = $object->getFilterWorkspaceId(); - } - if ($object->isInitialized('filterActionType') && null !== $object->getFilterActionType()) { - $data['filter_action_type'] = $object->getFilterActionType(); - } - if ($object->isInitialized('filterFromTimestamp') && null !== $object->getFilterFromTimestamp()) { - $data['filter_from_timestamp'] = $object->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('filterToTimestamp') && null !== $object->getFilterToTimestamp()) { - $data['filter_to_timestamp'] = $object->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('excludeColumns') && null !== $object->getExcludeColumns()) { - $data['exclude_columns'] = $object->getExcludeColumns(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('export_charset', $data)) { + $object->setExportCharset($data['export_charset']); + unset($data['export_charset']); + } + if (\array_key_exists('csv_column_separator', $data)) { + $object->setCsvColumnSeparator($data['csv_column_separator']); + unset($data['csv_column_separator']); + } + if (\array_key_exists('csv_first_row_header', $data)) { + $object->setCsvFirstRowHeader($data['csv_first_row_header']); + unset($data['csv_first_row_header']); + } + if (\array_key_exists('filter_user_id', $data)) { + $object->setFilterUserId($data['filter_user_id']); + unset($data['filter_user_id']); + } + if (\array_key_exists('filter_workspace_id', $data)) { + $object->setFilterWorkspaceId($data['filter_workspace_id']); + unset($data['filter_workspace_id']); + } + if (\array_key_exists('filter_action_type', $data)) { + $object->setFilterActionType($data['filter_action_type']); + unset($data['filter_action_type']); + } + if (\array_key_exists('filter_from_timestamp', $data)) { + $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); + unset($data['filter_from_timestamp']); + } + if (\array_key_exists('filter_to_timestamp', $data)) { + $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); + unset($data['filter_to_timestamp']); + } + if (\array_key_exists('exclude_columns', $data)) { + $object->setExcludeColumns($data['exclude_columns']); + unset($data['exclude_columns']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('exported_file_name', $data)) { + $object->setExportedFileName($data['exported_file_name']); + unset($data['exported_file_name']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => false]; - } + return $object; } -} else { - class SingleAuditLogExportJobResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('exportCharset') && null !== $data->getExportCharset()) { + $dataArray['export_charset'] = $data->getExportCharset(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class === get_class($data); + if ($data->isInitialized('csvColumnSeparator') && null !== $data->getCsvColumnSeparator()) { + $dataArray['csv_column_separator'] = $data->getCsvColumnSeparator(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('export_charset', $data)) { - $object->setExportCharset($data['export_charset']); - unset($data['export_charset']); - } - if (\array_key_exists('csv_column_separator', $data)) { - $object->setCsvColumnSeparator($data['csv_column_separator']); - unset($data['csv_column_separator']); - } - if (\array_key_exists('csv_first_row_header', $data)) { - $object->setCsvFirstRowHeader($data['csv_first_row_header']); - unset($data['csv_first_row_header']); - } - if (\array_key_exists('filter_user_id', $data)) { - $object->setFilterUserId($data['filter_user_id']); - unset($data['filter_user_id']); - } - if (\array_key_exists('filter_workspace_id', $data)) { - $object->setFilterWorkspaceId($data['filter_workspace_id']); - unset($data['filter_workspace_id']); - } - if (\array_key_exists('filter_action_type', $data)) { - $object->setFilterActionType($data['filter_action_type']); - unset($data['filter_action_type']); - } - if (\array_key_exists('filter_from_timestamp', $data)) { - $object->setFilterFromTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_from_timestamp'])); - unset($data['filter_from_timestamp']); - } - if (\array_key_exists('filter_to_timestamp', $data)) { - $object->setFilterToTimestamp(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['filter_to_timestamp'])); - unset($data['filter_to_timestamp']); - } - if (\array_key_exists('exclude_columns', $data)) { - $object->setExcludeColumns($data['exclude_columns']); - unset($data['exclude_columns']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('exported_file_name', $data)) { - $object->setExportedFileName($data['exported_file_name']); - unset($data['exported_file_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('csvFirstRowHeader') && null !== $data->getCsvFirstRowHeader()) { + $dataArray['csv_first_row_header'] = $data->getCsvFirstRowHeader(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('exportCharset') && null !== $object->getExportCharset()) { - $data['export_charset'] = $object->getExportCharset(); - } - if ($object->isInitialized('csvColumnSeparator') && null !== $object->getCsvColumnSeparator()) { - $data['csv_column_separator'] = $object->getCsvColumnSeparator(); - } - if ($object->isInitialized('csvFirstRowHeader') && null !== $object->getCsvFirstRowHeader()) { - $data['csv_first_row_header'] = $object->getCsvFirstRowHeader(); - } - if ($object->isInitialized('filterUserId') && null !== $object->getFilterUserId()) { - $data['filter_user_id'] = $object->getFilterUserId(); - } - if ($object->isInitialized('filterWorkspaceId') && null !== $object->getFilterWorkspaceId()) { - $data['filter_workspace_id'] = $object->getFilterWorkspaceId(); - } - if ($object->isInitialized('filterActionType') && null !== $object->getFilterActionType()) { - $data['filter_action_type'] = $object->getFilterActionType(); - } - if ($object->isInitialized('filterFromTimestamp') && null !== $object->getFilterFromTimestamp()) { - $data['filter_from_timestamp'] = $object->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('filterToTimestamp') && null !== $object->getFilterToTimestamp()) { - $data['filter_to_timestamp'] = $object->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('excludeColumns') && null !== $object->getExcludeColumns()) { - $data['exclude_columns'] = $object->getExcludeColumns(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('filterUserId') && null !== $data->getFilterUserId()) { + $dataArray['filter_user_id'] = $data->getFilterUserId(); + } + if ($data->isInitialized('filterWorkspaceId') && null !== $data->getFilterWorkspaceId()) { + $dataArray['filter_workspace_id'] = $data->getFilterWorkspaceId(); + } + if ($data->isInitialized('filterActionType') && null !== $data->getFilterActionType()) { + $dataArray['filter_action_type'] = $data->getFilterActionType(); + } + if ($data->isInitialized('filterFromTimestamp') && null !== $data->getFilterFromTimestamp()) { + $dataArray['filter_from_timestamp'] = $data->getFilterFromTimestamp()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('filterToTimestamp') && null !== $data->getFilterToTimestamp()) { + $dataArray['filter_to_timestamp'] = $data->getFilterToTimestamp()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('excludeColumns') && null !== $data->getExcludeColumns()) { + $dataArray['exclude_columns'] = $data->getExcludeColumns(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleAuditLogExportJobResponse::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicateApplicationJobTypeNormalizer.php b/generated/Normalizer/SingleDuplicateApplicationJobTypeNormalizer.php index ff93439..a5a597c 100644 --- a/generated/Normalizer/SingleDuplicateApplicationJobTypeNormalizer.php +++ b/generated/Normalizer/SingleDuplicateApplicationJobTypeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicateApplicationJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicateApplicationJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_application', $data)) { - $object->setOriginalApplication($data['original_application']); - unset($data['original_application']); - } - if (\array_key_exists('duplicated_application', $data)) { - $object->setDuplicatedApplication($data['duplicated_application']); - unset($data['duplicated_application']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class SingleDuplicateApplicationJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_application', $data)) { - $object->setOriginalApplication($data['original_application']); - unset($data['original_application']); - } - if (\array_key_exists('duplicated_application', $data)) { - $object->setDuplicatedApplication($data['duplicated_application']); - unset($data['duplicated_application']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('original_application', $data)) { + $object->setOriginalApplication($data['original_application']); + unset($data['original_application']); + } + if (\array_key_exists('duplicated_application', $data)) { + $object->setDuplicatedApplication($data['duplicated_application']); + unset($data['duplicated_application']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateApplicationJobType::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer.php b/generated/Normalizer/SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer.php index 83c3441..6515f67 100644 --- a/generated/Normalizer/SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer.php +++ b/generated/Normalizer/SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => false]; - } + return $object; } -} else { - class SingleDuplicateFieldJobTypeDuplicatedFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicateFieldJobTypeNormalizer.php b/generated/Normalizer/SingleDuplicateFieldJobTypeNormalizer.php index 5ff74f5..eed735b 100644 --- a/generated/Normalizer/SingleDuplicateFieldJobTypeNormalizer.php +++ b/generated/Normalizer/SingleDuplicateFieldJobTypeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicateFieldJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicateFieldJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_field', $data)) { - $object->setOriginalField($this->denormalizer->denormalize($data['original_field'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class, 'json', $context)); - unset($data['original_field']); - } - if (\array_key_exists('duplicated_field', $data)) { - $object->setDuplicatedField($this->denormalizer->denormalize($data['duplicated_field'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class, 'json', $context)); - unset($data['duplicated_field']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class SingleDuplicateFieldJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_field', $data)) { - $object->setOriginalField($this->denormalizer->denormalize($data['original_field'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class, 'json', $context)); - unset($data['original_field']); - } - if (\array_key_exists('duplicated_field', $data)) { - $object->setDuplicatedField($this->denormalizer->denormalize($data['duplicated_field'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class, 'json', $context)); - unset($data['duplicated_field']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('original_field', $data)) { + $object->setOriginalField($this->denormalizer->denormalize($data['original_field'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class, 'json', $context)); + unset($data['original_field']); + } + if (\array_key_exists('duplicated_field', $data)) { + $object->setDuplicatedField($this->denormalizer->denormalize($data['duplicated_field'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeDuplicatedField::class, 'json', $context)); + unset($data['duplicated_field']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobType::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicateFieldJobTypeOriginalFieldNormalizer.php b/generated/Normalizer/SingleDuplicateFieldJobTypeOriginalFieldNormalizer.php index 4072644..ca5893e 100644 --- a/generated/Normalizer/SingleDuplicateFieldJobTypeOriginalFieldNormalizer.php +++ b/generated/Normalizer/SingleDuplicateFieldJobTypeOriginalFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicateFieldJobTypeOriginalFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicateFieldJobTypeOriginalFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => false]; - } + return $object; } -} else { - class SingleDuplicateFieldJobTypeOriginalFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateFieldJobTypeOriginalField::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicatePageJobTypeDuplicatedPageNormalizer.php b/generated/Normalizer/SingleDuplicatePageJobTypeDuplicatedPageNormalizer.php index 5f5ac65..7c0bd7f 100644 --- a/generated/Normalizer/SingleDuplicatePageJobTypeDuplicatedPageNormalizer.php +++ b/generated/Normalizer/SingleDuplicatePageJobTypeDuplicatedPageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicatePageJobTypeDuplicatedPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicatePageJobTypeDuplicatedPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; - } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('path', $data)) { + $object->setPath($data['path']); + unset($data['path']); + } + if (\array_key_exists('path_params', $data)) { + $values = []; + foreach ($data['path_params'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); } - - return $data; + $object->setPathParams($values); + unset($data['path_params']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class SingleDuplicatePageJobTypeDuplicatedPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class === $type; + if (\array_key_exists('builder_id', $data)) { + $object->setBuilderId($data['builder_id']); + unset($data['builder_id']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class === get_class($data); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['path'] = $data->getPath(); + if ($data->isInitialized('pathParams') && null !== $data->getPathParams()) { + $values = []; + foreach ($data->getPathParams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['path_params'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicatePageJobTypeNormalizer.php b/generated/Normalizer/SingleDuplicatePageJobTypeNormalizer.php index 56ed7b8..7480e40 100644 --- a/generated/Normalizer/SingleDuplicatePageJobTypeNormalizer.php +++ b/generated/Normalizer/SingleDuplicatePageJobTypeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicatePageJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicatePageJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_page', $data)) { - $object->setOriginalPage($this->denormalizer->denormalize($data['original_page'], \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class, 'json', $context)); - unset($data['original_page']); - } - if (\array_key_exists('duplicated_page', $data)) { - $object->setDuplicatedPage($this->denormalizer->denormalize($data['duplicated_page'], \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class, 'json', $context)); - unset($data['duplicated_page']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class SingleDuplicatePageJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_page', $data)) { - $object->setOriginalPage($this->denormalizer->denormalize($data['original_page'], \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class, 'json', $context)); - unset($data['original_page']); - } - if (\array_key_exists('duplicated_page', $data)) { - $object->setDuplicatedPage($this->denormalizer->denormalize($data['duplicated_page'], \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class, 'json', $context)); - unset($data['duplicated_page']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('original_page', $data)) { + $object->setOriginalPage($this->denormalizer->denormalize($data['original_page'], \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class, 'json', $context)); + unset($data['original_page']); + } + if (\array_key_exists('duplicated_page', $data)) { + $object->setDuplicatedPage($this->denormalizer->denormalize($data['duplicated_page'], \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeDuplicatedPage::class, 'json', $context)); + unset($data['duplicated_page']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobType::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicatePageJobTypeOriginalPageNormalizer.php b/generated/Normalizer/SingleDuplicatePageJobTypeOriginalPageNormalizer.php index 42eeb4a..6775024 100644 --- a/generated/Normalizer/SingleDuplicatePageJobTypeOriginalPageNormalizer.php +++ b/generated/Normalizer/SingleDuplicatePageJobTypeOriginalPageNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicatePageJobTypeOriginalPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicatePageJobTypeOriginalPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; - } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('path', $data)) { + $object->setPath($data['path']); + unset($data['path']); + } + if (\array_key_exists('path_params', $data)) { + $values = []; + foreach ($data['path_params'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); } - - return $data; + $object->setPathParams($values); + unset($data['path_params']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class SingleDuplicatePageJobTypeOriginalPageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class === $type; + if (\array_key_exists('builder_id', $data)) { + $object->setBuilderId($data['builder_id']); + unset($data['builder_id']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class === get_class($data); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('path', $data)) { - $object->setPath($data['path']); - unset($data['path']); - } - if (\array_key_exists('path_params', $data)) { - $values = []; - foreach ($data['path_params'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\PathParam::class, 'json', $context); - } - $object->setPathParams($values); - unset($data['path_params']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['path'] = $data->getPath(); + if ($data->isInitialized('pathParams') && null !== $data->getPathParams()) { + $values = []; + foreach ($data->getPathParams() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $dataArray['path_params'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['path'] = $object->getPath(); - if ($object->isInitialized('pathParams') && null !== $object->getPathParams()) { - $values = []; - foreach ($object->getPathParams() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['path_params'] = $values; + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicatePageJobTypeOriginalPage::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicateTableJobTypeDuplicatedTableNormalizer.php b/generated/Normalizer/SingleDuplicateTableJobTypeDuplicatedTableNormalizer.php index 1c2d127..7d8b2ff 100644 --- a/generated/Normalizer/SingleDuplicateTableJobTypeDuplicatedTableNormalizer.php +++ b/generated/Normalizer/SingleDuplicateTableJobTypeDuplicatedTableNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicateTableJobTypeDuplicatedTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicateTableJobTypeDuplicatedTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class SingleDuplicateTableJobTypeDuplicatedTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class === $type; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class === get_class($data); + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicateTableJobTypeNormalizer.php b/generated/Normalizer/SingleDuplicateTableJobTypeNormalizer.php index 70456d6..9d37a6e 100644 --- a/generated/Normalizer/SingleDuplicateTableJobTypeNormalizer.php +++ b/generated/Normalizer/SingleDuplicateTableJobTypeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,91 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicateTableJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicateTableJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_table', $data)) { - $object->setOriginalTable($this->denormalizer->denormalize($data['original_table'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class, 'json', $context)); - unset($data['original_table']); - } - if (\array_key_exists('duplicated_table', $data)) { - $object->setDuplicatedTable($this->denormalizer->denormalize($data['duplicated_table'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class, 'json', $context)); - unset($data['duplicated_table']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class SingleDuplicateTableJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('original_table', $data)) { - $object->setOriginalTable($this->denormalizer->denormalize($data['original_table'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class, 'json', $context)); - unset($data['original_table']); - } - if (\array_key_exists('duplicated_table', $data)) { - $object->setDuplicatedTable($this->denormalizer->denormalize($data['duplicated_table'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class, 'json', $context)); - unset($data['duplicated_table']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('original_table', $data)) { + $object->setOriginalTable($this->denormalizer->denormalize($data['original_table'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class, 'json', $context)); + unset($data['original_table']); + } + if (\array_key_exists('duplicated_table', $data)) { + $object->setDuplicatedTable($this->denormalizer->denormalize($data['duplicated_table'], \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeDuplicatedTable::class, 'json', $context)); + unset($data['duplicated_table']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobType::class => false]; } } diff --git a/generated/Normalizer/SingleDuplicateTableJobTypeOriginalTableNormalizer.php b/generated/Normalizer/SingleDuplicateTableJobTypeOriginalTableNormalizer.php index 913225f..bf4b502 100644 --- a/generated/Normalizer/SingleDuplicateTableJobTypeOriginalTableNormalizer.php +++ b/generated/Normalizer/SingleDuplicateTableJobTypeOriginalTableNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleDuplicateTableJobTypeOriginalTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleDuplicateTableJobTypeOriginalTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class SingleDuplicateTableJobTypeOriginalTableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class === $type; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class === get_class($data); + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleDuplicateTableJobTypeOriginalTable::class => false]; } } diff --git a/generated/Normalizer/SingleFileImportJobSerializerClassNormalizer.php b/generated/Normalizer/SingleFileImportJobSerializerClassNormalizer.php index f303d44..9c9e84d 100644 --- a/generated/Normalizer/SingleFileImportJobSerializerClassNormalizer.php +++ b/generated/Normalizer/SingleFileImportJobSerializerClassNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,231 +20,117 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleFileImportJobSerializerClassNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleFileImportJobSerializerClassNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('first_row_header', $data)) { - $object->setFirstRowHeader($data['first_row_header']); - unset($data['first_row_header']); - } - if (\array_key_exists('report', $data)) { - $object->setReport($this->denormalizer->denormalize($data['report'], \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class, 'json', $context)); - unset($data['report']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass(); + if (\array_key_exists('first_row_header', $data) && \is_int($data['first_row_header'])) { + $data['first_row_header'] = (bool) $data['first_row_header']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - $data['database_id'] = $object->getDatabaseId(); - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('firstRowHeader') && null !== $object->getFirstRowHeader()) { - $data['first_row_header'] = $object->getFirstRowHeader(); - } - $data['report'] = $this->normalizer->normalize($object->getReport(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); + } + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); + } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('first_row_header', $data)) { + $object->setFirstRowHeader($data['first_row_header']); + unset($data['first_row_header']); + } + if (\array_key_exists('report', $data)) { + $object->setReport($this->denormalizer->denormalize($data['report'], \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class, 'json', $context)); + unset($data['report']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => false]; - } + return $object; } -} else { - class SingleFileImportJobSerializerClassNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class === get_class($data); + $dataArray['database_id'] = $data->getDatabaseId(); + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('first_row_header', $data)) { - $object->setFirstRowHeader($data['first_row_header']); - unset($data['first_row_header']); - } - if (\array_key_exists('report', $data)) { - $object->setReport($this->denormalizer->denormalize($data['report'], \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class, 'json', $context)); - unset($data['report']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('tableId') && null !== $data->getTableId()) { + $dataArray['table_id'] = $data->getTableId(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - $data['database_id'] = $object->getDatabaseId(); - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('tableId') && null !== $object->getTableId()) { - $data['table_id'] = $object->getTableId(); - } - if ($object->isInitialized('firstRowHeader') && null !== $object->getFirstRowHeader()) { - $data['first_row_header'] = $object->getFirstRowHeader(); - } - $data['report'] = $this->normalizer->normalize($object->getReport(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('firstRowHeader') && null !== $data->getFirstRowHeader()) { + $dataArray['first_row_header'] = $data->getFirstRowHeader(); + } + $dataArray['report'] = $this->normalizer->normalize($data->getReport(), 'json', $context); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClass::class => false]; } } diff --git a/generated/Normalizer/SingleFileImportJobSerializerClassReportNormalizer.php b/generated/Normalizer/SingleFileImportJobSerializerClassReportNormalizer.php index 89c429c..3f2b6ef 100644 --- a/generated/Normalizer/SingleFileImportJobSerializerClassReportNormalizer.php +++ b/generated/Normalizer/SingleFileImportJobSerializerClassReportNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,67 +20,39 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleFileImportJobSerializerClassReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleFileImportJobSerializerClassReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('failing_rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['failing_rows'] as $key => $value) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; - } - $object->setFailingRows($values); - unset($data['failing_rows']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getFailingRows() as $key => $value) { - $values_1 = []; + if (\array_key_exists('failing_rows', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['failing_rows'] as $key => $value) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($value as $key_1 => $value_1) { $values_2 = []; foreach ($value_1 as $value_2) { @@ -91,107 +62,45 @@ public function normalize(mixed $object, ?string $format = null, array $context } $values[$key] = $values_1; } - $data['failing_rows'] = $values; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } + $object->setFailingRows($values); + unset($data['failing_rows']); + } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => false]; - } + return $object; } -} else { - class SingleFileImportJobSerializerClassReportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('failing_rows', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['failing_rows'] as $key => $value) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; - } - $object->setFailingRows($values); - unset($data['failing_rows']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getFailingRows() as $key => $value) { + $values_1 = []; + foreach ($value as $key_1 => $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; } + $values_1[$key_1] = $values_2; } - - return $object; + $values[$key] = $values_1; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getFailingRows() as $key => $value) { - $values_1 = []; - foreach ($value as $key_1 => $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $value_2; - } - $values_1[$key_1] = $values_2; - } - $values[$key] = $values_1; + $dataArray['failing_rows'] = $values; + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $dataArray[$key_2] = $value_3; } - $data['failing_rows'] = $values; - foreach ($object as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $data[$key_2] = $value_3; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleFileImportJobSerializerClassReport::class => false]; } } diff --git a/generated/Normalizer/SingleInstallTemplateJobTypeGroupNormalizer.php b/generated/Normalizer/SingleInstallTemplateJobTypeGroupNormalizer.php index 1636ee8..95f3ccf 100644 --- a/generated/Normalizer/SingleInstallTemplateJobTypeGroupNormalizer.php +++ b/generated/Normalizer/SingleInstallTemplateJobTypeGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleInstallTemplateJobTypeGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleInstallTemplateJobTypeGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class SingleInstallTemplateJobTypeGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class => false]; } } diff --git a/generated/Normalizer/SingleInstallTemplateJobTypeNormalizer.php b/generated/Normalizer/SingleInstallTemplateJobTypeNormalizer.php index 6097d08..65b07d7 100644 --- a/generated/Normalizer/SingleInstallTemplateJobTypeNormalizer.php +++ b/generated/Normalizer/SingleInstallTemplateJobTypeNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,201 +20,99 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleInstallTemplateJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleInstallTemplateJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class, 'json', $context)); - unset($data['workspace']); - } - if (\array_key_exists('template', $data)) { - $object->setTemplate($this->denormalizer->denormalize($data['template'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class, 'json', $context)); - unset($data['template']); - } - if (\array_key_exists('installed_applications', $data)) { - $object->setInstalledApplications($data['installed_applications']); - unset($data['installed_applications']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class, 'json', $context)); - unset($data['group']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class SingleInstallTemplateJobTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class === $type; + if (\array_key_exists('progress_percentage', $data)) { + $object->setProgressPercentage($data['progress_percentage']); + unset($data['progress_percentage']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class === get_class($data); + if (\array_key_exists('state', $data)) { + $object->setState($data['state']); + unset($data['state']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('progress_percentage', $data)) { - $object->setProgressPercentage($data['progress_percentage']); - unset($data['progress_percentage']); - } - if (\array_key_exists('state', $data)) { - $object->setState($data['state']); - unset($data['state']); - } - if (\array_key_exists('human_readable_error', $data)) { - $object->setHumanReadableError($data['human_readable_error']); - unset($data['human_readable_error']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class, 'json', $context)); - unset($data['workspace']); - } - if (\array_key_exists('template', $data)) { - $object->setTemplate($this->denormalizer->denormalize($data['template'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class, 'json', $context)); - unset($data['template']); - } - if (\array_key_exists('installed_applications', $data)) { - $object->setInstalledApplications($data['installed_applications']); - unset($data['installed_applications']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class, 'json', $context)); - unset($data['group']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('human_readable_error', $data)) { + $object->setHumanReadableError($data['human_readable_error']); + unset($data['human_readable_error']); + } + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($this->denormalizer->denormalize($data['workspace'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class, 'json', $context)); + unset($data['workspace']); + } + if (\array_key_exists('template', $data)) { + $object->setTemplate($this->denormalizer->denormalize($data['template'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class, 'json', $context)); + unset($data['template']); + } + if (\array_key_exists('installed_applications', $data)) { + $object->setInstalledApplications($data['installed_applications']); + unset($data['installed_applications']); + } + if (\array_key_exists('group', $data)) { + $object->setGroup($this->denormalizer->denormalize($data['group'], \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeGroup::class, 'json', $context)); + unset($data['group']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['progress_percentage'] = $object->getProgressPercentage(); - $data['state'] = $object->getState(); - if ($object->isInitialized('humanReadableError') && null !== $object->getHumanReadableError()) { - $data['human_readable_error'] = $object->getHumanReadableError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['progress_percentage'] = $data->getProgressPercentage(); + $dataArray['state'] = $data->getState(); + if ($data->isInitialized('humanReadableError') && null !== $data->getHumanReadableError()) { + $dataArray['human_readable_error'] = $data->getHumanReadableError(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobType::class => false]; } } diff --git a/generated/Normalizer/SingleInstallTemplateJobTypeTemplateNormalizer.php b/generated/Normalizer/SingleInstallTemplateJobTypeTemplateNormalizer.php index 0073664..3b3bca1 100644 --- a/generated/Normalizer/SingleInstallTemplateJobTypeTemplateNormalizer.php +++ b/generated/Normalizer/SingleInstallTemplateJobTypeTemplateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,189 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleInstallTemplateJobTypeTemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleInstallTemplateJobTypeTemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('icon', $data)) { - $object->setIcon($data['icon']); - unset($data['icon']); - } - if (\array_key_exists('keywords', $data)) { - $object->setKeywords($data['keywords']); - unset($data['keywords']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { - $object->setWorkspaceId(null); - } - if (\array_key_exists('is_default', $data)) { - $object->setIsDefault($data['is_default']); - unset($data['is_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['icon'] = $object->getIcon(); - if ($object->isInitialized('keywords') && null !== $object->getKeywords()) { - $data['keywords'] = $object->getKeywords(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class SingleInstallTemplateJobTypeTemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class === $type; + if (\array_key_exists('icon', $data)) { + $object->setIcon($data['icon']); + unset($data['icon']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class === get_class($data); + if (\array_key_exists('keywords', $data)) { + $object->setKeywords($data['keywords']); + unset($data['keywords']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('icon', $data)) { - $object->setIcon($data['icon']); - unset($data['icon']); - } - if (\array_key_exists('keywords', $data)) { - $object->setKeywords($data['keywords']); - unset($data['keywords']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { - $object->setWorkspaceId(null); - } - if (\array_key_exists('is_default', $data)) { - $object->setIsDefault($data['is_default']); - unset($data['is_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('group_id', $data)) { + $object->setGroupId($data['group_id']); + unset($data['group_id']); + } + if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { + $object->setWorkspaceId($data['workspace_id']); + unset($data['workspace_id']); + } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { + $object->setWorkspaceId(null); + } + if (\array_key_exists('is_default', $data)) { + $object->setIsDefault($data['is_default']); + unset($data['is_default']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['icon'] = $object->getIcon(); - if ($object->isInitialized('keywords') && null !== $object->getKeywords()) { - $data['keywords'] = $object->getKeywords(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['icon'] = $data->getIcon(); + if ($data->isInitialized('keywords') && null !== $data->getKeywords()) { + $dataArray['keywords'] = $data->getKeywords(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeTemplate::class => false]; } } diff --git a/generated/Normalizer/SingleInstallTemplateJobTypeWorkspaceNormalizer.php b/generated/Normalizer/SingleInstallTemplateJobTypeWorkspaceNormalizer.php index 14938c9..13bebbf 100644 --- a/generated/Normalizer/SingleInstallTemplateJobTypeWorkspaceNormalizer.php +++ b/generated/Normalizer/SingleInstallTemplateJobTypeWorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleInstallTemplateJobTypeWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleInstallTemplateJobTypeWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class SingleInstallTemplateJobTypeWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleInstallTemplateJobTypeWorkspace::class => false]; } } diff --git a/generated/Normalizer/SingleSelectFieldCreateFieldNormalizer.php b/generated/Normalizer/SingleSelectFieldCreateFieldNormalizer.php index e124a39..1a3ea3c 100644 --- a/generated/Normalizer/SingleSelectFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/SingleSelectFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,187 +20,92 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleSelectFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleSelectFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('select_options', $data)) { + $values = []; + foreach ($data['select_options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSelectOptions($values); + unset($data['select_options']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => false]; - } + return $object; } -} else { - class SingleSelectFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); + if ($data->isInitialized('selectOptions') && null !== $data->getSelectOptions()) { + $values = []; + foreach ($data->getSelectOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + $dataArray['select_options'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/SingleSelectFieldFieldNormalizer.php b/generated/Normalizer/SingleSelectFieldFieldNormalizer.php index 8c11610..a1f4375 100644 --- a/generated/Normalizer/SingleSelectFieldFieldNormalizer.php +++ b/generated/Normalizer/SingleSelectFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,233 +20,121 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleSelectFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleSelectFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('select_options', $data)) { + $values = []; + foreach ($data['select_options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSelectOptions($values); + unset($data['select_options']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => false]; - } + return $object; } -} else { - class SingleSelectFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + if ($data->isInitialized('selectOptions') && null !== $data->getSelectOptions()) { + $values = []; + foreach ($data->getSelectOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + $dataArray['select_options'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldField::class => false]; } } diff --git a/generated/Normalizer/SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer.php index e70c035..7e1ec58 100644 --- a/generated/Normalizer/SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,249 +20,129 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('select_options', $data)) { - $values_1 = []; - foreach ($data['select_options'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values_1); - unset($data['select_options']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('select_options', $data)) { + $values_1 = []; + foreach ($data['select_options'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSelectOptions($values_1); + unset($data['select_options']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class SingleSelectFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); + if ($data->isInitialized('selectOptions') && null !== $data->getSelectOptions()) { + $values = []; + foreach ($data->getSelectOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('select_options', $data)) { - $values_1 = []; - foreach ($data['select_options'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values_1); - unset($data['select_options']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; + $dataArray['select_options'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/SingleSelectFieldUpdateFieldNormalizer.php b/generated/Normalizer/SingleSelectFieldUpdateFieldNormalizer.php index 8915a5b..d1fb3e1 100644 --- a/generated/Normalizer/SingleSelectFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/SingleSelectFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,195 +20,96 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SingleSelectFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SingleSelectFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('select_options', $data)) { + $values = []; + foreach ($data['select_options'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSelectOptions($values); + unset($data['select_options']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => false]; - } + return $object; } -} else { - class SingleSelectFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('select_options', $data)) { - $values = []; - foreach ($data['select_options'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\SelectOption::class, 'json', $context); - } - $object->setSelectOptions($values); - unset($data['select_options']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('selectOptions') && null !== $object->getSelectOptions()) { - $values = []; - foreach ($object->getSelectOptions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['select_options'] = $values; + if ($data->isInitialized('selectOptions') && null !== $data->getSelectOptions()) { + $values = []; + foreach ($data->getSelectOptions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['select_options'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SingleSelectFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/SnapshotCreatedByNormalizer.php b/generated/Normalizer/SnapshotCreatedByNormalizer.php index 691431e..f94f1cb 100644 --- a/generated/Normalizer/SnapshotCreatedByNormalizer.php +++ b/generated/Normalizer/SnapshotCreatedByNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SnapshotCreatedByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SnapshotCreatedByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['username'] = $object->getUsername(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => false]; - } + return $object; } -} else { - class SnapshotCreatedByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['username'] = $data->getUsername(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['username'] = $object->getUsername(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class => false]; } } diff --git a/generated/Normalizer/SnapshotNormalizer.php b/generated/Normalizer/SnapshotNormalizer.php index 2790e78..bbd4abc 100644 --- a/generated/Normalizer/SnapshotNormalizer.php +++ b/generated/Normalizer/SnapshotNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SnapshotNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SnapshotNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Snapshot::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Snapshot::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Snapshot::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Snapshot::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Snapshot(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('snapshot_from_application', $data)) { - $object->setSnapshotFromApplication($data['snapshot_from_application']); - unset($data['snapshot_from_application']); - } - if (\array_key_exists('created_by', $data)) { - $object->setCreatedBy($this->denormalizer->denormalize($data['created_by'], \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class, 'json', $context)); - unset($data['created_by']); - } - if (\array_key_exists('created_at', $data)) { - $object->setCreatedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_at'])); - unset($data['created_at']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Snapshot(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Snapshot::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class SnapshotNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Snapshot::class === $type; + if (\array_key_exists('snapshot_from_application', $data)) { + $object->setSnapshotFromApplication($data['snapshot_from_application']); + unset($data['snapshot_from_application']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Snapshot::class === get_class($data); + if (\array_key_exists('created_by', $data)) { + $object->setCreatedBy($this->denormalizer->denormalize($data['created_by'], \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class, 'json', $context)); + unset($data['created_by']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Snapshot(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('snapshot_from_application', $data)) { - $object->setSnapshotFromApplication($data['snapshot_from_application']); - unset($data['snapshot_from_application']); - } - if (\array_key_exists('created_by', $data)) { - $object->setCreatedBy($this->denormalizer->denormalize($data['created_by'], \CedricZiel\Baserow\Generated\Model\SnapshotCreatedBy::class, 'json', $context)); - unset($data['created_by']); - } - if (\array_key_exists('created_at', $data)) { - $object->setCreatedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_at'])); - unset($data['created_at']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('created_at', $data)) { + $object->setCreatedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_at'])); + unset($data['created_at']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Snapshot::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Snapshot::class => false]; } } diff --git a/generated/Normalizer/SubDomainCreateDomainNormalizer.php b/generated/Normalizer/SubDomainCreateDomainNormalizer.php index 36e9fef..0f20b35 100644 --- a/generated/Normalizer/SubDomainCreateDomainNormalizer.php +++ b/generated/Normalizer/SubDomainCreateDomainNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SubDomainCreateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SubDomainCreateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['type'] = $object->getType(); - $data['domain_name'] = $object->getDomainName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => false]; + if (\array_key_exists('domain_name', $data)) { + $object->setDomainName($data['domain_name']); + unset($data['domain_name']); } - } -} else { - class SubDomainCreateDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['type'] = $data->getType(); + $dataArray['domain_name'] = $data->getDomainName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['type'] = $object->getType(); - $data['domain_name'] = $object->getDomainName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SubDomainCreateDomain::class => false]; } } diff --git a/generated/Normalizer/SubDomainDomainNormalizer.php b/generated/Normalizer/SubDomainDomainNormalizer.php index 52223d7..51ab93b 100644 --- a/generated/Normalizer/SubDomainDomainNormalizer.php +++ b/generated/Normalizer/SubDomainDomainNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,181 +20,89 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SubDomainDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SubDomainDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SubDomainDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - if (\array_key_exists('last_published', $data) && null !== $data['last_published']) { - $object->setLastPublished(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_published'])); - unset($data['last_published']); - } elseif (\array_key_exists('last_published', $data) && null === $data['last_published']) { - $object->setLastPublished(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SubDomainDomain(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['domain_name'] = $object->getDomainName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('lastPublished') && null !== $object->getLastPublished()) { - $data['last_published'] = $object->getLastPublished()->format('Y-m-d\TH:i:sP'); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class SubDomainDomainNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class === $type; + if (\array_key_exists('domain_name', $data)) { + $object->setDomainName($data['domain_name']); + unset($data['domain_name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubDomainDomain::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SubDomainDomain(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('domain_name', $data)) { - $object->setDomainName($data['domain_name']); - unset($data['domain_name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('builder_id', $data)) { - $object->setBuilderId($data['builder_id']); - unset($data['builder_id']); - } - if (\array_key_exists('last_published', $data) && null !== $data['last_published']) { - $object->setLastPublished(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_published'])); - unset($data['last_published']); - } elseif (\array_key_exists('last_published', $data) && null === $data['last_published']) { - $object->setLastPublished(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('builder_id', $data)) { + $object->setBuilderId($data['builder_id']); + unset($data['builder_id']); + } + if (\array_key_exists('last_published', $data) && null !== $data['last_published']) { + $object->setLastPublished(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_published'])); + unset($data['last_published']); + } elseif (\array_key_exists('last_published', $data) && null === $data['last_published']) { + $object->setLastPublished(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['domain_name'] = $object->getDomainName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('lastPublished') && null !== $object->getLastPublished()) { - $data['last_published'] = $object->getLastPublished()->format('Y-m-d\TH:i:sP'); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['domain_name'] = $data->getDomainName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('lastPublished') && null !== $data->getLastPublished()) { + $dataArray['last_published'] = $data->getLastPublished()->format('Y-m-d\TH:i:sP'); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SubDomainDomain::class => false]; } } diff --git a/generated/Normalizer/SubjectUserNormalizer.php b/generated/Normalizer/SubjectUserNormalizer.php index d69ea30..f178fe7 100644 --- a/generated/Normalizer/SubjectUserNormalizer.php +++ b/generated/Normalizer/SubjectUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,74 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SubjectUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class SubjectUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\SubjectUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SubjectUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubjectUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubjectUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SubjectUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\SubjectUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SubjectUser::class => false]; + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); } - } -} else { - class SubjectUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\SubjectUser::class === $type; + if (\array_key_exists('first_name', $data)) { + $object->setFirstName($data['first_name']); + unset($data['first_name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\SubjectUser::class === get_class($data); + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\SubjectUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('first_name', $data)) { - $object->setFirstName($data['first_name']); - unset($data['first_name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\SubjectUser::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\SubjectUser::class => false]; } } diff --git a/generated/Normalizer/TableCreateNormalizer.php b/generated/Normalizer/TableCreateNormalizer.php index 7cc76ed..724e7a0 100644 --- a/generated/Normalizer/TableCreateNormalizer.php +++ b/generated/Normalizer/TableCreateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,173 +20,88 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableCreate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableCreate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableCreate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableCreate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableCreate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('data', $data)) { - $values = []; - foreach ($data['data'] as $value) { - $values[] = $value; - } - $object->setData($values); - unset($data['data']); - } - if (\array_key_exists('first_row_header', $data)) { - $object->setFirstRowHeader($data['first_row_header']); - unset($data['first_row_header']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableCreate(); + if (\array_key_exists('first_row_header', $data) && \is_int($data['first_row_header'])) { + $data['first_row_header'] = (bool) $data['first_row_header']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - if ($object->isInitialized('data') && null !== $object->getData()) { - $values = []; - foreach ($object->getData() as $value) { - $values[] = $value; - } - $data['data'] = $values; - } - if ($object->isInitialized('firstRowHeader') && null !== $object->getFirstRowHeader()) { - $data['first_row_header'] = $object->getFirstRowHeader(); + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('data', $data)) { + $values = []; + foreach ($data['data'] as $value) { + $values[] = $value; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setData($values); + unset($data['data']); + } + if (\array_key_exists('first_row_header', $data)) { + $object->setFirstRowHeader($data['first_row_header']); + unset($data['first_row_header']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableCreate::class => false]; - } + return $object; } -} else { - class TableCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableCreate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('data') && null !== $data->getData()) { + $values = []; + foreach ($data->getData() as $value) { + $values[] = $value; + } + $dataArray['data'] = $values; } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableCreate::class === get_class($data); + if ($data->isInitialized('firstRowHeader') && null !== $data->getFirstRowHeader()) { + $dataArray['first_row_header'] = $data->getFirstRowHeader(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableCreate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('data', $data)) { - $values = []; - foreach ($data['data'] as $value) { - $values[] = $value; - } - $object->setData($values); - unset($data['data']); - } - if (\array_key_exists('first_row_header', $data)) { - $object->setFirstRowHeader($data['first_row_header']); - unset($data['first_row_header']); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - if ($object->isInitialized('data') && null !== $object->getData()) { - $values = []; - foreach ($object->getData() as $value) { - $values[] = $value; - } - $data['data'] = $values; - } - if ($object->isInitialized('firstRowHeader') && null !== $object->getFirstRowHeader()) { - $data['first_row_header'] = $object->getFirstRowHeader(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableCreate::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableCreate::class => false]; } } diff --git a/generated/Normalizer/TableElementCreateElementNormalizer.php b/generated/Normalizer/TableElementCreateElementNormalizer.php index 4c83f61..269c75d 100644 --- a/generated/Normalizer/TableElementCreateElementNormalizer.php +++ b/generated/Normalizer/TableElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,623 +20,310 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + if (\array_key_exists('items_per_page', $data)) { + $object->setItemsPerPage($data['items_per_page']); + unset($data['items_per_page']); + } + if (\array_key_exists('button_load_more_label', $data)) { + $object->setButtonLoadMoreLabel($data['button_load_more_label']); + unset($data['button_load_more_label']); + } + if (\array_key_exists('fields', $data)) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFields($values); + unset($data['fields']); + } + if (\array_key_exists('orientation', $data)) { + $object->setOrientation($data['orientation']); + unset($data['orientation']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => false]; - } + return $object; } -} else { - class TableElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); + } + if ($data->isInitialized('itemsPerPage') && null !== $data->getItemsPerPage()) { + $dataArray['items_per_page'] = $data->getItemsPerPage(); + } + if ($data->isInitialized('buttonLoadMoreLabel') && null !== $data->getButtonLoadMoreLabel()) { + $dataArray['button_load_more_label'] = $data->getButtonLoadMoreLabel(); + } + if ($data->isInitialized('fields') && null !== $data->getFields()) { + $values = []; + foreach ($data->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['fields'] = $values; + } + if ($data->isInitialized('orientation') && null !== $data->getOrientation()) { + $dataArray['orientation'] = $data->getOrientation(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/TableElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/TableElementCreateElementStyleBackgroundFileNormalizer.php index 9da0d74..146be78 100644 --- a/generated/Normalizer/TableElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/TableElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class TableElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/TableElementElementNormalizer.php b/generated/Normalizer/TableElementElementNormalizer.php index 4792b6b..b20f8cf 100644 --- a/generated/Normalizer/TableElementElementNormalizer.php +++ b/generated/Normalizer/TableElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,653 +20,325 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + if (\array_key_exists('items_per_page', $data)) { + $object->setItemsPerPage($data['items_per_page']); + unset($data['items_per_page']); + } + if (\array_key_exists('button_load_more_label', $data)) { + $object->setButtonLoadMoreLabel($data['button_load_more_label']); + unset($data['button_load_more_label']); + } + if (\array_key_exists('fields', $data)) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFields($values); + unset($data['fields']); + } + if (\array_key_exists('orientation', $data)) { + $object->setOrientation($data['orientation']); + unset($data['orientation']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementElement::class => false]; - } + return $object; } -} else { - class TableElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); + } + if ($data->isInitialized('itemsPerPage') && null !== $data->getItemsPerPage()) { + $dataArray['items_per_page'] = $data->getItemsPerPage(); + } + if ($data->isInitialized('buttonLoadMoreLabel') && null !== $data->getButtonLoadMoreLabel()) { + $dataArray['button_load_more_label'] = $data->getButtonLoadMoreLabel(); + } + if ($data->isInitialized('fields') && null !== $data->getFields()) { + $values = []; + foreach ($data->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['fields'] = $values; + } + if ($data->isInitialized('orientation') && null !== $data->getOrientation()) { + $dataArray['orientation'] = $data->getOrientation(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableElementElement::class => false]; } } diff --git a/generated/Normalizer/TableElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/TableElementElementStyleBackgroundFileNormalizer.php index 7c6cd74..c1bc49f 100644 --- a/generated/Normalizer/TableElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/TableElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class TableElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/TableElementPublicElementNormalizer.php b/generated/Normalizer/TableElementPublicElementNormalizer.php index f30751c..c5983b7 100644 --- a/generated/Normalizer/TableElementPublicElementNormalizer.php +++ b/generated/Normalizer/TableElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,645 +20,321 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + if (\array_key_exists('items_per_page', $data)) { + $object->setItemsPerPage($data['items_per_page']); + unset($data['items_per_page']); + } + if (\array_key_exists('button_load_more_label', $data)) { + $object->setButtonLoadMoreLabel($data['button_load_more_label']); + unset($data['button_load_more_label']); + } + if (\array_key_exists('fields', $data)) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFields($values); + unset($data['fields']); + } + if (\array_key_exists('orientation', $data)) { + $object->setOrientation($data['orientation']); + unset($data['orientation']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => false]; - } + return $object; } -} else { - class TableElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); + } + if ($data->isInitialized('itemsPerPage') && null !== $data->getItemsPerPage()) { + $dataArray['items_per_page'] = $data->getItemsPerPage(); + } + if ($data->isInitialized('buttonLoadMoreLabel') && null !== $data->getButtonLoadMoreLabel()) { + $dataArray['button_load_more_label'] = $data->getButtonLoadMoreLabel(); + } + if ($data->isInitialized('fields') && null !== $data->getFields()) { + $values = []; + foreach ($data->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['fields'] = $values; + } + if ($data->isInitialized('orientation') && null !== $data->getOrientation()) { + $dataArray['orientation'] = $data->getOrientation(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/TableElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/TableElementPublicElementStyleBackgroundFileNormalizer.php index 4da434e..19b8cb9 100644 --- a/generated/Normalizer/TableElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/TableElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class TableElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/TableElementUpdateElementNormalizer.php b/generated/Normalizer/TableElementUpdateElementNormalizer.php index 9493a4f..97e5e07 100644 --- a/generated/Normalizer/TableElementUpdateElementNormalizer.php +++ b/generated/Normalizer/TableElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,591 +20,294 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { + $object->setDataSourceId($data['data_source_id']); + unset($data['data_source_id']); + } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { + $object->setDataSourceId(null); + } + if (\array_key_exists('items_per_page', $data)) { + $object->setItemsPerPage($data['items_per_page']); + unset($data['items_per_page']); + } + if (\array_key_exists('button_load_more_label', $data)) { + $object->setButtonLoadMoreLabel($data['button_load_more_label']); + unset($data['button_load_more_label']); + } + if (\array_key_exists('fields', $data)) { + $values = []; + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFields($values); + unset($data['fields']); + } + if (\array_key_exists('orientation', $data)) { + $object->setOrientation($data['orientation']); + unset($data['orientation']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => false]; - } + return $object; } -} else { - class TableElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\ButtonConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('data_source_id', $data) && null !== $data['data_source_id']) { - $object->setDataSourceId($data['data_source_id']); - unset($data['data_source_id']); - } elseif (\array_key_exists('data_source_id', $data) && null === $data['data_source_id']) { - $object->setDataSourceId(null); - } - if (\array_key_exists('items_per_page', $data)) { - $object->setItemsPerPage($data['items_per_page']); - unset($data['items_per_page']); - } - if (\array_key_exists('button_load_more_label', $data)) { - $object->setButtonLoadMoreLabel($data['button_load_more_label']); - unset($data['button_load_more_label']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\CollectionField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - if (\array_key_exists('orientation', $data)) { - $object->setOrientation($data['orientation']); - unset($data['orientation']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('dataSourceId') && null !== $object->getDataSourceId()) { - $data['data_source_id'] = $object->getDataSourceId(); - } - if ($object->isInitialized('itemsPerPage') && null !== $object->getItemsPerPage()) { - $data['items_per_page'] = $object->getItemsPerPage(); - } - if ($object->isInitialized('buttonLoadMoreLabel') && null !== $object->getButtonLoadMoreLabel()) { - $data['button_load_more_label'] = $object->getButtonLoadMoreLabel(); - } - if ($object->isInitialized('fields') && null !== $object->getFields()) { - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - } - if ($object->isInitialized('orientation') && null !== $object->getOrientation()) { - $data['orientation'] = $object->getOrientation(); + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('dataSourceId') && null !== $data->getDataSourceId()) { + $dataArray['data_source_id'] = $data->getDataSourceId(); + } + if ($data->isInitialized('itemsPerPage') && null !== $data->getItemsPerPage()) { + $dataArray['items_per_page'] = $data->getItemsPerPage(); + } + if ($data->isInitialized('buttonLoadMoreLabel') && null !== $data->getButtonLoadMoreLabel()) { + $dataArray['button_load_more_label'] = $data->getButtonLoadMoreLabel(); + } + if ($data->isInitialized('fields') && null !== $data->getFields()) { + $values = []; + foreach ($data->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['fields'] = $values; + } + if ($data->isInitialized('orientation') && null !== $data->getOrientation()) { + $dataArray['orientation'] = $data->getOrientation(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/TableElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/TableElementUpdateElementStyleBackgroundFileNormalizer.php index 137fa5e..e333c67 100644 --- a/generated/Normalizer/TableElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/TableElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class TableElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/TableImportNormalizer.php b/generated/Normalizer/TableImportNormalizer.php index f332f48..f208154 100644 --- a/generated/Normalizer/TableImportNormalizer.php +++ b/generated/Normalizer/TableImportNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableImportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableImportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableImport::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableImport::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableImport::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableImport::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableImport(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('data', $data)) { - $values = []; - foreach ($data['data'] as $value) { - $values[] = $value; - } - $object->setData($values); - unset($data['data']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableImport(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('data', $data)) { $values = []; - foreach ($object->getData() as $value) { + foreach ($data['data'] as $value) { $values[] = $value; } - $data['data'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setData($values); + unset($data['data']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableImport::class => false]; - } + return $object; } -} else { - class TableImportNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableImport::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableImport::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getData() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['data'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\TableImport(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('data', $data)) { - $values = []; - foreach ($data['data'] as $value) { - $values[] = $value; - } - $object->setData($values); - unset($data['data']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getData() as $value) { - $values[] = $value; - } - $data['data'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableImport::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableImport::class => false]; } } diff --git a/generated/Normalizer/TableNormalizer.php b/generated/Normalizer/TableNormalizer.php index 65da5e5..972c14c 100644 --- a/generated/Normalizer/TableNormalizer.php +++ b/generated/Normalizer/TableNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Table::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Table::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Table::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Table::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Table(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Table(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Table::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TableNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Table::class === $type; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Table::class === get_class($data); + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Table(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Table::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Table::class => false]; } } diff --git a/generated/Normalizer/TableSerializerWithFieldsNormalizer.php b/generated/Normalizer/TableSerializerWithFieldsNormalizer.php index 2ef8b77..53db076 100644 --- a/generated/Normalizer/TableSerializerWithFieldsNormalizer.php +++ b/generated/Normalizer/TableSerializerWithFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,181 +20,89 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableSerializerWithFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableSerializerWithFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); - } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('database_id', $data)) { + $object->setDatabaseId($data['database_id']); + unset($data['database_id']); + } + if (\array_key_exists('fields', $data)) { $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class, 'json', $context); } - $data['fields'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setFields($values); + unset($data['fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => false]; - } + return $object; } -} else { - class TableSerializerWithFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $values = []; + foreach ($data->getFields() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableSerializerWithFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('database_id', $data)) { - $object->setDatabaseId($data['database_id']); - unset($data['database_id']); + $dataArray['fields'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - if (\array_key_exists('fields', $data)) { - $values = []; - foreach ($data['fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\LocalBaserowField::class, 'json', $context); - } - $object->setFields($values); - unset($data['fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $values = []; - foreach ($object->getFields() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['fields'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableSerializerWithFields::class => false]; } } diff --git a/generated/Normalizer/TableWebhookCallNormalizer.php b/generated/Normalizer/TableWebhookCallNormalizer.php index aee3799..36b7515 100644 --- a/generated/Normalizer/TableWebhookCallNormalizer.php +++ b/generated/Normalizer/TableWebhookCallNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,245 +20,121 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableWebhookCallNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableWebhookCallNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookCall(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('event_id', $data)) { - $object->setEventId($data['event_id']); - unset($data['event_id']); - } - if (\array_key_exists('event_type', $data)) { - $object->setEventType($data['event_type']); - unset($data['event_type']); - } - if (\array_key_exists('called_time', $data) && null !== $data['called_time']) { - $object->setCalledTime(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['called_time'])); - unset($data['called_time']); - } elseif (\array_key_exists('called_time', $data) && null === $data['called_time']) { - $object->setCalledTime(null); - } - if (\array_key_exists('called_url', $data)) { - $object->setCalledUrl($data['called_url']); - unset($data['called_url']); - } - if (\array_key_exists('request', $data) && null !== $data['request']) { - $object->setRequest($data['request']); - unset($data['request']); - } elseif (\array_key_exists('request', $data) && null === $data['request']) { - $object->setRequest(null); - } - if (\array_key_exists('response', $data) && null !== $data['response']) { - $object->setResponse($data['response']); - unset($data['response']); - } elseif (\array_key_exists('response', $data) && null === $data['response']) { - $object->setResponse(null); - } - if (\array_key_exists('response_status', $data) && null !== $data['response_status']) { - $object->setResponseStatus($data['response_status']); - unset($data['response_status']); - } elseif (\array_key_exists('response_status', $data) && null === $data['response_status']) { - $object->setResponseStatus(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookCall(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['event_type'] = $object->getEventType(); - if ($object->isInitialized('calledTime') && null !== $object->getCalledTime()) { - $data['called_time'] = $object->getCalledTime()->format('Y-m-d\TH:i:sP'); - } - $data['called_url'] = $object->getCalledUrl(); - if ($object->isInitialized('request') && null !== $object->getRequest()) { - $data['request'] = $object->getRequest(); - } - if ($object->isInitialized('response') && null !== $object->getResponse()) { - $data['response'] = $object->getResponse(); - } - if ($object->isInitialized('responseStatus') && null !== $object->getResponseStatus()) { - $data['response_status'] = $object->getResponseStatus(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('event_id', $data)) { + $object->setEventId($data['event_id']); + unset($data['event_id']); + } + if (\array_key_exists('event_type', $data)) { + $object->setEventType($data['event_type']); + unset($data['event_type']); + } + if (\array_key_exists('called_time', $data) && null !== $data['called_time']) { + $object->setCalledTime(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['called_time'])); + unset($data['called_time']); + } elseif (\array_key_exists('called_time', $data) && null === $data['called_time']) { + $object->setCalledTime(null); + } + if (\array_key_exists('called_url', $data)) { + $object->setCalledUrl($data['called_url']); + unset($data['called_url']); + } + if (\array_key_exists('request', $data) && null !== $data['request']) { + $object->setRequest($data['request']); + unset($data['request']); + } elseif (\array_key_exists('request', $data) && null === $data['request']) { + $object->setRequest(null); + } + if (\array_key_exists('response', $data) && null !== $data['response']) { + $object->setResponse($data['response']); + unset($data['response']); + } elseif (\array_key_exists('response', $data) && null === $data['response']) { + $object->setResponse(null); + } + if (\array_key_exists('response_status', $data) && null !== $data['response_status']) { + $object->setResponseStatus($data['response_status']); + unset($data['response_status']); + } elseif (\array_key_exists('response_status', $data) && null === $data['response_status']) { + $object->setResponseStatus(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => false]; - } + return $object; } -} else { - class TableWebhookCallNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['event_type'] = $data->getEventType(); + if ($data->isInitialized('calledTime') && null !== $data->getCalledTime()) { + $dataArray['called_time'] = $data->getCalledTime()->format('Y-m-d\TH:i:sP'); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class === get_class($data); + $dataArray['called_url'] = $data->getCalledUrl(); + if ($data->isInitialized('request') && null !== $data->getRequest()) { + $dataArray['request'] = $data->getRequest(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookCall(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('event_id', $data)) { - $object->setEventId($data['event_id']); - unset($data['event_id']); - } - if (\array_key_exists('event_type', $data)) { - $object->setEventType($data['event_type']); - unset($data['event_type']); - } - if (\array_key_exists('called_time', $data) && null !== $data['called_time']) { - $object->setCalledTime(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['called_time'])); - unset($data['called_time']); - } elseif (\array_key_exists('called_time', $data) && null === $data['called_time']) { - $object->setCalledTime(null); - } - if (\array_key_exists('called_url', $data)) { - $object->setCalledUrl($data['called_url']); - unset($data['called_url']); - } - if (\array_key_exists('request', $data) && null !== $data['request']) { - $object->setRequest($data['request']); - unset($data['request']); - } elseif (\array_key_exists('request', $data) && null === $data['request']) { - $object->setRequest(null); - } - if (\array_key_exists('response', $data) && null !== $data['response']) { - $object->setResponse($data['response']); - unset($data['response']); - } elseif (\array_key_exists('response', $data) && null === $data['response']) { - $object->setResponse(null); - } - if (\array_key_exists('response_status', $data) && null !== $data['response_status']) { - $object->setResponseStatus($data['response_status']); - unset($data['response_status']); - } elseif (\array_key_exists('response_status', $data) && null === $data['response_status']) { - $object->setResponseStatus(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('response') && null !== $data->getResponse()) { + $dataArray['response'] = $data->getResponse(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['event_type'] = $object->getEventType(); - if ($object->isInitialized('calledTime') && null !== $object->getCalledTime()) { - $data['called_time'] = $object->getCalledTime()->format('Y-m-d\TH:i:sP'); - } - $data['called_url'] = $object->getCalledUrl(); - if ($object->isInitialized('request') && null !== $object->getRequest()) { - $data['request'] = $object->getRequest(); - } - if ($object->isInitialized('response') && null !== $object->getResponse()) { - $data['response'] = $object->getResponse(); - } - if ($object->isInitialized('responseStatus') && null !== $object->getResponseStatus()) { - $data['response_status'] = $object->getResponseStatus(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('responseStatus') && null !== $data->getResponseStatus()) { + $dataArray['response_status'] = $data->getResponseStatus(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableWebhookCall::class => false]; } } diff --git a/generated/Normalizer/TableWebhookCreateRequestNormalizer.php b/generated/Normalizer/TableWebhookCreateRequestNormalizer.php index 34e3e83..9fbc592 100644 --- a/generated/Normalizer/TableWebhookCreateRequestNormalizer.php +++ b/generated/Normalizer/TableWebhookCreateRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,241 +20,125 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableWebhookCreateRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableWebhookCreateRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('include_all_events', $data)) { - $object->setIncludeAllEvents($data['include_all_events']); - unset($data['include_all_events']); - } - if (\array_key_exists('events', $data)) { - $values = []; - foreach ($data['events'] as $value) { - $values[] = $value; - } - $object->setEvents($values); - unset($data['events']); - } - if (\array_key_exists('request_method', $data)) { - $object->setRequestMethod($data['request_method']); - unset($data['request_method']); - } - if (\array_key_exists('headers', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['headers'] as $key => $value_1) { - $values_1[$key] = $value_1; - } - $object->setHeaders($values_1); - unset($data['headers']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('use_user_field_names', $data)) { - $object->setUseUserFieldNames($data['use_user_field_names']); - unset($data['use_user_field_names']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest(); + if (\array_key_exists('include_all_events', $data) && \is_int($data['include_all_events'])) { + $data['include_all_events'] = (bool) $data['include_all_events']; + } + if (\array_key_exists('use_user_field_names', $data) && \is_int($data['use_user_field_names'])) { + $data['use_user_field_names'] = (bool) $data['use_user_field_names']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['url'] = $object->getUrl(); - if ($object->isInitialized('includeAllEvents') && null !== $object->getIncludeAllEvents()) { - $data['include_all_events'] = $object->getIncludeAllEvents(); - } - if ($object->isInitialized('events') && null !== $object->getEvents()) { - $values = []; - foreach ($object->getEvents() as $value) { - $values[] = $value; - } - $data['events'] = $values; - } - if ($object->isInitialized('requestMethod') && null !== $object->getRequestMethod()) { - $data['request_method'] = $object->getRequestMethod(); - } - if ($object->isInitialized('headers') && null !== $object->getHeaders()) { - $values_1 = []; - foreach ($object->getHeaders() as $key => $value_1) { - $values_1[$key] = $value_1; - } - $data['headers'] = $values_1; - } - $data['name'] = $object->getName(); - if ($object->isInitialized('useUserFieldNames') && null !== $object->getUseUserFieldNames()) { - $data['use_user_field_names'] = $object->getUseUserFieldNames(); + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('include_all_events', $data)) { + $object->setIncludeAllEvents($data['include_all_events']); + unset($data['include_all_events']); + } + if (\array_key_exists('events', $data)) { + $values = []; + foreach ($data['events'] as $value) { + $values[] = $value; } - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } + $object->setEvents($values); + unset($data['events']); + } + if (\array_key_exists('request_method', $data)) { + $object->setRequestMethod($data['request_method']); + unset($data['request_method']); + } + if (\array_key_exists('headers', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['headers'] as $key => $value_1) { + $values_1[$key] = $value_1; } - - return $data; + $object->setHeaders($values_1); + unset($data['headers']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TableWebhookCreateRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class === $type; + if (\array_key_exists('use_user_field_names', $data)) { + $object->setUseUserFieldNames($data['use_user_field_names']); + unset($data['use_user_field_names']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class === get_class($data); + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('include_all_events', $data)) { - $object->setIncludeAllEvents($data['include_all_events']); - unset($data['include_all_events']); - } - if (\array_key_exists('events', $data)) { - $values = []; - foreach ($data['events'] as $value) { - $values[] = $value; - } - $object->setEvents($values); - unset($data['events']); - } - if (\array_key_exists('request_method', $data)) { - $object->setRequestMethod($data['request_method']); - unset($data['request_method']); - } - if (\array_key_exists('headers', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['headers'] as $key => $value_1) { - $values_1[$key] = $value_1; - } - $object->setHeaders($values_1); - unset($data['headers']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('use_user_field_names', $data)) { - $object->setUseUserFieldNames($data['use_user_field_names']); - unset($data['use_user_field_names']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['url'] = $data->getUrl(); + if ($data->isInitialized('includeAllEvents') && null !== $data->getIncludeAllEvents()) { + $dataArray['include_all_events'] = $data->getIncludeAllEvents(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['url'] = $object->getUrl(); - if ($object->isInitialized('includeAllEvents') && null !== $object->getIncludeAllEvents()) { - $data['include_all_events'] = $object->getIncludeAllEvents(); + if ($data->isInitialized('events') && null !== $data->getEvents()) { + $values = []; + foreach ($data->getEvents() as $value) { + $values[] = $value; } - if ($object->isInitialized('events') && null !== $object->getEvents()) { - $values = []; - foreach ($object->getEvents() as $value) { - $values[] = $value; - } - $data['events'] = $values; - } - if ($object->isInitialized('requestMethod') && null !== $object->getRequestMethod()) { - $data['request_method'] = $object->getRequestMethod(); - } - if ($object->isInitialized('headers') && null !== $object->getHeaders()) { - $values_1 = []; - foreach ($object->getHeaders() as $key => $value_1) { - $values_1[$key] = $value_1; - } - $data['headers'] = $values_1; - } - $data['name'] = $object->getName(); - if ($object->isInitialized('useUserFieldNames') && null !== $object->getUseUserFieldNames()) { - $data['use_user_field_names'] = $object->getUseUserFieldNames(); + $dataArray['events'] = $values; + } + if ($data->isInitialized('requestMethod') && null !== $data->getRequestMethod()) { + $dataArray['request_method'] = $data->getRequestMethod(); + } + if ($data->isInitialized('headers') && null !== $data->getHeaders()) { + $values_1 = []; + foreach ($data->getHeaders() as $key => $value_1) { + $values_1[$key] = $value_1; } - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } + $dataArray['headers'] = $values_1; + } + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('useUserFieldNames') && null !== $data->getUseUserFieldNames()) { + $dataArray['use_user_field_names'] = $data->getUseUserFieldNames(); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableWebhookCreateRequest::class => false]; } } diff --git a/generated/Normalizer/TableWebhookNormalizer.php b/generated/Normalizer/TableWebhookNormalizer.php index 111f474..a0833b0 100644 --- a/generated/Normalizer/TableWebhookNormalizer.php +++ b/generated/Normalizer/TableWebhookNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,291 +20,153 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableWebhookNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableWebhookNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableWebhook::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhook::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhook::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhook::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhook(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('events', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['events'] as $key => $value) { - $values[$key] = $value; - } - $object->setEvents($values); - unset($data['events']); - } - if (\array_key_exists('headers', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['headers'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setHeaders($values_1); - unset($data['headers']); - } - if (\array_key_exists('calls', $data)) { - $values_2 = []; - foreach ($data['calls'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class, 'json', $context); - } - $object->setCalls($values_2); - unset($data['calls']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('updated_on', $data)) { - $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); - unset($data['updated_on']); - } - if (\array_key_exists('use_user_field_names', $data)) { - $object->setUseUserFieldNames($data['use_user_field_names']); - unset($data['use_user_field_names']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('request_method', $data)) { - $object->setRequestMethod($data['request_method']); - unset($data['request_method']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('include_all_events', $data)) { - $object->setIncludeAllEvents($data['include_all_events']); - unset($data['include_all_events']); - } - if (\array_key_exists('failed_triggers', $data)) { - $object->setFailedTriggers($data['failed_triggers']); - unset($data['failed_triggers']); - } - if (\array_key_exists('active', $data)) { - $object->setActive($data['active']); - unset($data['active']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableWebhook(); + if (\array_key_exists('use_user_field_names', $data) && \is_int($data['use_user_field_names'])) { + $data['use_user_field_names'] = (bool) $data['use_user_field_names']; + } + if (\array_key_exists('include_all_events', $data) && \is_int($data['include_all_events'])) { + $data['include_all_events'] = (bool) $data['include_all_events']; + } + if (\array_key_exists('active', $data) && \is_int($data['active'])) { + $data['active'] = (bool) $data['active']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getCalls() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['calls'] = $values; - if ($object->isInitialized('useUserFieldNames') && null !== $object->getUseUserFieldNames()) { - $data['use_user_field_names'] = $object->getUseUserFieldNames(); - } - $data['url'] = $object->getUrl(); - if ($object->isInitialized('requestMethod') && null !== $object->getRequestMethod()) { - $data['request_method'] = $object->getRequestMethod(); - } - $data['name'] = $object->getName(); - if ($object->isInitialized('includeAllEvents') && null !== $object->getIncludeAllEvents()) { - $data['include_all_events'] = $object->getIncludeAllEvents(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('events', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['events'] as $key => $value) { + $values[$key] = $value; } - if ($object->isInitialized('failedTriggers') && null !== $object->getFailedTriggers()) { - $data['failed_triggers'] = $object->getFailedTriggers(); + $object->setEvents($values); + unset($data['events']); + } + if (\array_key_exists('headers', $data)) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['headers'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; } - if ($object->isInitialized('active') && null !== $object->getActive()) { - $data['active'] = $object->getActive(); + $object->setHeaders($values_1); + unset($data['headers']); + } + if (\array_key_exists('calls', $data)) { + $values_2 = []; + foreach ($data['calls'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setCalls($values_2); + unset($data['calls']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('updated_on', $data)) { + $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); + unset($data['updated_on']); + } + if (\array_key_exists('use_user_field_names', $data)) { + $object->setUseUserFieldNames($data['use_user_field_names']); + unset($data['use_user_field_names']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('request_method', $data)) { + $object->setRequestMethod($data['request_method']); + unset($data['request_method']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('include_all_events', $data)) { + $object->setIncludeAllEvents($data['include_all_events']); + unset($data['include_all_events']); + } + if (\array_key_exists('failed_triggers', $data)) { + $object->setFailedTriggers($data['failed_triggers']); + unset($data['failed_triggers']); + } + if (\array_key_exists('active', $data)) { + $object->setActive($data['active']); + unset($data['active']); + } + foreach ($data as $key_2 => $value_3) { + if (preg_match('/.*/', (string) $key_2)) { + $object[$key_2] = $value_3; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhook::class => false]; - } + return $object; } -} else { - class TableWebhookNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhook::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getCalls() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhook::class === get_class($data); + $dataArray['calls'] = $values; + if ($data->isInitialized('useUserFieldNames') && null !== $data->getUseUserFieldNames()) { + $dataArray['use_user_field_names'] = $data->getUseUserFieldNames(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhook(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('events', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['events'] as $key => $value) { - $values[$key] = $value; - } - $object->setEvents($values); - unset($data['events']); - } - if (\array_key_exists('headers', $data)) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['headers'] as $key_1 => $value_1) { - $values_1[$key_1] = $value_1; - } - $object->setHeaders($values_1); - unset($data['headers']); - } - if (\array_key_exists('calls', $data)) { - $values_2 = []; - foreach ($data['calls'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\TableWebhookCall::class, 'json', $context); - } - $object->setCalls($values_2); - unset($data['calls']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('updated_on', $data)) { - $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); - unset($data['updated_on']); - } - if (\array_key_exists('use_user_field_names', $data)) { - $object->setUseUserFieldNames($data['use_user_field_names']); - unset($data['use_user_field_names']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('request_method', $data)) { - $object->setRequestMethod($data['request_method']); - unset($data['request_method']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('include_all_events', $data)) { - $object->setIncludeAllEvents($data['include_all_events']); - unset($data['include_all_events']); - } - if (\array_key_exists('failed_triggers', $data)) { - $object->setFailedTriggers($data['failed_triggers']); - unset($data['failed_triggers']); - } - if (\array_key_exists('active', $data)) { - $object->setActive($data['active']); - unset($data['active']); - } - foreach ($data as $key_2 => $value_3) { - if (preg_match('/.*/', (string) $key_2)) { - $object[$key_2] = $value_3; - } - } - - return $object; + $dataArray['url'] = $data->getUrl(); + if ($data->isInitialized('requestMethod') && null !== $data->getRequestMethod()) { + $dataArray['request_method'] = $data->getRequestMethod(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getCalls() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['calls'] = $values; - if ($object->isInitialized('useUserFieldNames') && null !== $object->getUseUserFieldNames()) { - $data['use_user_field_names'] = $object->getUseUserFieldNames(); - } - $data['url'] = $object->getUrl(); - if ($object->isInitialized('requestMethod') && null !== $object->getRequestMethod()) { - $data['request_method'] = $object->getRequestMethod(); - } - $data['name'] = $object->getName(); - if ($object->isInitialized('includeAllEvents') && null !== $object->getIncludeAllEvents()) { - $data['include_all_events'] = $object->getIncludeAllEvents(); - } - if ($object->isInitialized('failedTriggers') && null !== $object->getFailedTriggers()) { - $data['failed_triggers'] = $object->getFailedTriggers(); - } - if ($object->isInitialized('active') && null !== $object->getActive()) { - $data['active'] = $object->getActive(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('includeAllEvents') && null !== $data->getIncludeAllEvents()) { + $dataArray['include_all_events'] = $data->getIncludeAllEvents(); + } + if ($data->isInitialized('failedTriggers') && null !== $data->getFailedTriggers()) { + $dataArray['failed_triggers'] = $data->getFailedTriggers(); + } + if ($data->isInitialized('active') && null !== $data->getActive()) { + $dataArray['active'] = $data->getActive(); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhook::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableWebhook::class => false]; } } diff --git a/generated/Normalizer/TableWebhookTestCallRequestNormalizer.php b/generated/Normalizer/TableWebhookTestCallRequestNormalizer.php index 21b55c9..548f633 100644 --- a/generated/Normalizer/TableWebhookTestCallRequestNormalizer.php +++ b/generated/Normalizer/TableWebhookTestCallRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,197 +20,100 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableWebhookTestCallRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableWebhookTestCallRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('event_type', $data)) { - $object->setEventType($data['event_type']); - unset($data['event_type']); - } - if (\array_key_exists('request_method', $data)) { - $object->setRequestMethod($data['request_method']); - unset($data['request_method']); - } - if (\array_key_exists('headers', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['headers'] as $key => $value) { - $values[$key] = $value; - } - $object->setHeaders($values); - unset($data['headers']); - } - if (\array_key_exists('use_user_field_names', $data)) { - $object->setUseUserFieldNames($data['use_user_field_names']); - unset($data['use_user_field_names']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest(); + if (\array_key_exists('use_user_field_names', $data) && \is_int($data['use_user_field_names'])) { + $data['use_user_field_names'] = (bool) $data['use_user_field_names']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['url'] = $object->getUrl(); - $data['event_type'] = $object->getEventType(); - if ($object->isInitialized('requestMethod') && null !== $object->getRequestMethod()) { - $data['request_method'] = $object->getRequestMethod(); - } - if ($object->isInitialized('headers') && null !== $object->getHeaders()) { - $values = []; - foreach ($object->getHeaders() as $key => $value) { - $values[$key] = $value; - } - $data['headers'] = $values; - } - if ($object->isInitialized('useUserFieldNames') && null !== $object->getUseUserFieldNames()) { - $data['use_user_field_names'] = $object->getUseUserFieldNames(); + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('event_type', $data)) { + $object->setEventType($data['event_type']); + unset($data['event_type']); + } + if (\array_key_exists('request_method', $data)) { + $object->setRequestMethod($data['request_method']); + unset($data['request_method']); + } + if (\array_key_exists('headers', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['headers'] as $key => $value) { + $values[$key] = $value; } - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } + $object->setHeaders($values); + unset($data['headers']); + } + if (\array_key_exists('use_user_field_names', $data)) { + $object->setUseUserFieldNames($data['use_user_field_names']); + unset($data['use_user_field_names']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => false]; - } + return $object; } -} else { - class TableWebhookTestCallRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['url'] = $data->getUrl(); + $dataArray['event_type'] = $data->getEventType(); + if ($data->isInitialized('requestMethod') && null !== $data->getRequestMethod()) { + $dataArray['request_method'] = $data->getRequestMethod(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('event_type', $data)) { - $object->setEventType($data['event_type']); - unset($data['event_type']); - } - if (\array_key_exists('request_method', $data)) { - $object->setRequestMethod($data['request_method']); - unset($data['request_method']); - } - if (\array_key_exists('headers', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['headers'] as $key => $value) { - $values[$key] = $value; - } - $object->setHeaders($values); - unset($data['headers']); - } - if (\array_key_exists('use_user_field_names', $data)) { - $object->setUseUserFieldNames($data['use_user_field_names']); - unset($data['use_user_field_names']); + if ($data->isInitialized('headers') && null !== $data->getHeaders()) { + $values = []; + foreach ($data->getHeaders() as $key => $value) { + $values[$key] = $value; } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + $dataArray['headers'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['url'] = $object->getUrl(); - $data['event_type'] = $object->getEventType(); - if ($object->isInitialized('requestMethod') && null !== $object->getRequestMethod()) { - $data['request_method'] = $object->getRequestMethod(); - } - if ($object->isInitialized('headers') && null !== $object->getHeaders()) { - $values = []; - foreach ($object->getHeaders() as $key => $value) { - $values[$key] = $value; - } - $data['headers'] = $values; - } - if ($object->isInitialized('useUserFieldNames') && null !== $object->getUseUserFieldNames()) { - $data['use_user_field_names'] = $object->getUseUserFieldNames(); - } - foreach ($object as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_1; - } + if ($data->isInitialized('useUserFieldNames') && null !== $data->getUseUserFieldNames()) { + $dataArray['use_user_field_names'] = $data->getUseUserFieldNames(); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableWebhookTestCallRequest::class => false]; } } diff --git a/generated/Normalizer/TableWebhookTestCallResponseNormalizer.php b/generated/Normalizer/TableWebhookTestCallResponseNormalizer.php index c589c0e..c6d2c89 100644 --- a/generated/Normalizer/TableWebhookTestCallResponseNormalizer.php +++ b/generated/Normalizer/TableWebhookTestCallResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TableWebhookTestCallResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TableWebhookTestCallResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('request', $data)) { - $object->setRequest($data['request']); - unset($data['request']); - } - if (\array_key_exists('response', $data)) { - $object->setResponse($data['response']); - unset($data['response']); - } - if (\array_key_exists('status_code', $data)) { - $object->setStatusCode($data['status_code']); - unset($data['status_code']); - } - if (\array_key_exists('is_unreachable', $data)) { - $object->setIsUnreachable($data['is_unreachable']); - unset($data['is_unreachable']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse(); + if (\array_key_exists('is_unreachable', $data) && \is_int($data['is_unreachable'])) { + $data['is_unreachable'] = (bool) $data['is_unreachable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('request', $data)) { + $object->setRequest($data['request']); + unset($data['request']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => false]; + if (\array_key_exists('response', $data)) { + $object->setResponse($data['response']); + unset($data['response']); } - } -} else { - class TableWebhookTestCallResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class === $type; + if (\array_key_exists('status_code', $data)) { + $object->setStatusCode($data['status_code']); + unset($data['status_code']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class === get_class($data); + if (\array_key_exists('is_unreachable', $data)) { + $object->setIsUnreachable($data['is_unreachable']); + unset($data['is_unreachable']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('request', $data)) { - $object->setRequest($data['request']); - unset($data['request']); - } - if (\array_key_exists('response', $data)) { - $object->setResponse($data['response']); - unset($data['response']); - } - if (\array_key_exists('status_code', $data)) { - $object->setStatusCode($data['status_code']); - unset($data['status_code']); - } - if (\array_key_exists('is_unreachable', $data)) { - $object->setIsUnreachable($data['is_unreachable']); - unset($data['is_unreachable']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TableWebhookTestCallResponse::class => false]; } } diff --git a/generated/Normalizer/TeamNormalizer.php b/generated/Normalizer/TeamNormalizer.php index 0714310..bbc17c3 100644 --- a/generated/Normalizer/TeamNormalizer.php +++ b/generated/Normalizer/TeamNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,177 +20,87 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Team::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Team::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Team::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Team::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Team(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('default_role', $data) && null !== $data['default_role']) { - $object->setDefaultRole($data['default_role']); - unset($data['default_role']); - } elseif (\array_key_exists('default_role', $data) && null === $data['default_role']) { - $object->setDefaultRole(null); - } - if (\array_key_exists('subjects', $data)) { - $values = []; - foreach ($data['subjects'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TeamSubject::class, 'json', $context); - } - $object->setSubjects($values); - unset($data['subjects']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Team(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - if ($object->isInitialized('defaultRole') && null !== $object->getDefaultRole()) { - $data['default_role'] = $object->getDefaultRole(); - } - if ($object->isInitialized('subjects') && null !== $object->getSubjects()) { - $values = []; - foreach ($object->getSubjects() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['subjects'] = $values; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('default_role', $data) && null !== $data['default_role']) { + $object->setDefaultRole($data['default_role']); + unset($data['default_role']); + } elseif (\array_key_exists('default_role', $data) && null === $data['default_role']) { + $object->setDefaultRole(null); + } + if (\array_key_exists('subjects', $data)) { + $values = []; + foreach ($data['subjects'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TeamSubject::class, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setSubjects($values); + unset($data['subjects']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Team::class => false]; - } + return $object; } -} else { - class TeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Team::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Team::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('defaultRole') && null !== $data->getDefaultRole()) { + $dataArray['default_role'] = $data->getDefaultRole(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Team(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('default_role', $data) && null !== $data['default_role']) { - $object->setDefaultRole($data['default_role']); - unset($data['default_role']); - } elseif (\array_key_exists('default_role', $data) && null === $data['default_role']) { - $object->setDefaultRole(null); - } - if (\array_key_exists('subjects', $data)) { - $values = []; - foreach ($data['subjects'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TeamSubject::class, 'json', $context); - } - $object->setSubjects($values); - unset($data['subjects']); + if ($data->isInitialized('subjects') && null !== $data->getSubjects()) { + $values = []; + foreach ($data->getSubjects() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + $dataArray['subjects'] = $values; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - if ($object->isInitialized('defaultRole') && null !== $object->getDefaultRole()) { - $data['default_role'] = $object->getDefaultRole(); - } - if ($object->isInitialized('subjects') && null !== $object->getSubjects()) { - $values = []; - foreach ($object->getSubjects() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['subjects'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Team::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Team::class => false]; } } diff --git a/generated/Normalizer/TeamResponseNormalizer.php b/generated/Normalizer/TeamResponseNormalizer.php index aa1fed5..e33a877 100644 --- a/generated/Normalizer/TeamResponseNormalizer.php +++ b/generated/Normalizer/TeamResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,227 +20,112 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TeamResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TeamResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TeamResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TeamResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TeamResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('updated_on', $data)) { - $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); - unset($data['updated_on']); - } - if (\array_key_exists('default_role', $data)) { - $object->setDefaultRole($data['default_role']); - unset($data['default_role']); - } - if (\array_key_exists('subject_count', $data)) { - $object->setSubjectCount($data['subject_count']); - unset($data['subject_count']); - } - if (\array_key_exists('subject_sample', $data)) { - $values = []; - foreach ($data['subject_sample'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class, 'json', $context); - } - $object->setSubjectSample($values); - unset($data['subject_sample']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TeamResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - if ($object->isInitialized('defaultRole') && null !== $object->getDefaultRole()) { - $data['default_role'] = $object->getDefaultRole(); - } - $data['subject_count'] = $object->getSubjectCount(); - if ($object->isInitialized('subjectSample') && null !== $object->getSubjectSample()) { - $values = []; - foreach ($object->getSubjectSample() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['subject_sample'] = $values; - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TeamResponse::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TeamResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TeamResponse::class === $type; + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamResponse::class === get_class($data); + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TeamResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('updated_on', $data)) { - $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); - unset($data['updated_on']); - } - if (\array_key_exists('default_role', $data)) { - $object->setDefaultRole($data['default_role']); - unset($data['default_role']); - } - if (\array_key_exists('subject_count', $data)) { - $object->setSubjectCount($data['subject_count']); - unset($data['subject_count']); - } - if (\array_key_exists('subject_sample', $data)) { - $values = []; - foreach ($data['subject_sample'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class, 'json', $context); - } - $object->setSubjectSample($values); - unset($data['subject_sample']); + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('updated_on', $data)) { + $object->setUpdatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['updated_on'])); + unset($data['updated_on']); + } + if (\array_key_exists('default_role', $data)) { + $object->setDefaultRole($data['default_role']); + unset($data['default_role']); + } + if (\array_key_exists('subject_count', $data)) { + $object->setSubjectCount($data['subject_count']); + unset($data['subject_count']); + } + if (\array_key_exists('subject_sample', $data)) { + $values = []; + foreach ($data['subject_sample'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class, 'json', $context); } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $object->setSubjectSample($values); + unset($data['subject_sample']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - if ($object->isInitialized('defaultRole') && null !== $object->getDefaultRole()) { - $data['default_role'] = $object->getDefaultRole(); - } - $data['subject_count'] = $object->getSubjectCount(); - if ($object->isInitialized('subjectSample') && null !== $object->getSubjectSample()) { - $values = []; - foreach ($object->getSubjectSample() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['subject_sample'] = $values; + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['group'] = $data->getGroup(); + $dataArray['workspace'] = $data->getWorkspace(); + if ($data->isInitialized('defaultRole') && null !== $data->getDefaultRole()) { + $dataArray['default_role'] = $data->getDefaultRole(); + } + $dataArray['subject_count'] = $data->getSubjectCount(); + if ($data->isInitialized('subjectSample') && null !== $data->getSubjectSample()) { + $values = []; + foreach ($data->getSubjectSample() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $dataArray['subject_sample'] = $values; + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TeamResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TeamResponse::class => false]; } } diff --git a/generated/Normalizer/TeamSampleSubjectNormalizer.php b/generated/Normalizer/TeamSampleSubjectNormalizer.php index 2393593..d7ca916 100644 --- a/generated/Normalizer/TeamSampleSubjectNormalizer.php +++ b/generated/Normalizer/TeamSampleSubjectNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,159 +20,78 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TeamSampleSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TeamSampleSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TeamSampleSubject(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - if (\array_key_exists('subject_label', $data)) { - $object->setSubjectLabel($data['subject_label']); - unset($data['subject_label']); - } - if (\array_key_exists('team_subject_id', $data)) { - $object->setTeamSubjectId($data['team_subject_id']); - unset($data['team_subject_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TeamSampleSubject(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['subject_id'] = $object->getSubjectId(); - $data['subject_type'] = $object->getSubjectType(); - $data['subject_label'] = $object->getSubjectLabel(); - $data['team_subject_id'] = $object->getTeamSubjectId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('subject_id', $data)) { + $object->setSubjectId($data['subject_id']); + unset($data['subject_id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => false]; + if (\array_key_exists('subject_type', $data)) { + $object->setSubjectType($data['subject_type']); + unset($data['subject_type']); } - } -} else { - class TeamSampleSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class === $type; + if (\array_key_exists('subject_label', $data)) { + $object->setSubjectLabel($data['subject_label']); + unset($data['subject_label']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class === get_class($data); + if (\array_key_exists('team_subject_id', $data)) { + $object->setTeamSubjectId($data['team_subject_id']); + unset($data['team_subject_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TeamSampleSubject(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - if (\array_key_exists('subject_label', $data)) { - $object->setSubjectLabel($data['subject_label']); - unset($data['subject_label']); - } - if (\array_key_exists('team_subject_id', $data)) { - $object->setTeamSubjectId($data['team_subject_id']); - unset($data['team_subject_id']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['subject_id'] = $object->getSubjectId(); - $data['subject_type'] = $object->getSubjectType(); - $data['subject_label'] = $object->getSubjectLabel(); - $data['team_subject_id'] = $object->getTeamSubjectId(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['subject_id'] = $data->getSubjectId(); + $dataArray['subject_type'] = $data->getSubjectType(); + $dataArray['subject_label'] = $data->getSubjectLabel(); + $dataArray['team_subject_id'] = $data->getTeamSubjectId(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TeamSampleSubject::class => false]; } } diff --git a/generated/Normalizer/TeamSubjectNormalizer.php b/generated/Normalizer/TeamSubjectNormalizer.php index 9d838b8..2e1e8a8 100644 --- a/generated/Normalizer/TeamSubjectNormalizer.php +++ b/generated/Normalizer/TeamSubjectNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TeamSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TeamSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TeamSubject::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TeamSubject::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSubject::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSubject::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TeamSubject(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('subject_user_email', $data)) { - $object->setSubjectUserEmail($data['subject_user_email']); - unset($data['subject_user_email']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TeamSubject(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('subjectId') && null !== $object->getSubjectId()) { - $data['subject_id'] = $object->getSubjectId(); - } - if ($object->isInitialized('subjectUserEmail') && null !== $object->getSubjectUserEmail()) { - $data['subject_user_email'] = $object->getSubjectUserEmail(); - } - $data['subject_type'] = $object->getSubjectType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('subject_id', $data)) { + $object->setSubjectId($data['subject_id']); + unset($data['subject_id']); + } + if (\array_key_exists('subject_user_email', $data)) { + $object->setSubjectUserEmail($data['subject_user_email']); + unset($data['subject_user_email']); + } + if (\array_key_exists('subject_type', $data)) { + $object->setSubjectType($data['subject_type']); + unset($data['subject_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TeamSubject::class => false]; - } + return $object; } -} else { - class TeamSubjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TeamSubject::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('subjectId') && null !== $data->getSubjectId()) { + $dataArray['subject_id'] = $data->getSubjectId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSubject::class === get_class($data); + if ($data->isInitialized('subjectUserEmail') && null !== $data->getSubjectUserEmail()) { + $dataArray['subject_user_email'] = $data->getSubjectUserEmail(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TeamSubject(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('subject_user_email', $data)) { - $object->setSubjectUserEmail($data['subject_user_email']); - unset($data['subject_user_email']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); + $dataArray['subject_type'] = $data->getSubjectType(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('subjectId') && null !== $object->getSubjectId()) { - $data['subject_id'] = $object->getSubjectId(); - } - if ($object->isInitialized('subjectUserEmail') && null !== $object->getSubjectUserEmail()) { - $data['subject_user_email'] = $object->getSubjectUserEmail(); - } - $data['subject_type'] = $object->getSubjectType(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TeamSubject::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TeamSubject::class => false]; } } diff --git a/generated/Normalizer/TeamSubjectResponseNormalizer.php b/generated/Normalizer/TeamSubjectResponseNormalizer.php index 437184d..8f1b10c 100644 --- a/generated/Normalizer/TeamSubjectResponseNormalizer.php +++ b/generated/Normalizer/TeamSubjectResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TeamSubjectResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TeamSubjectResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - if (\array_key_exists('team', $data)) { - $object->setTeam($data['team']); - unset($data['team']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['subject_id'] = $object->getSubjectId(); - $data['team'] = $object->getTeam(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => false]; + if (\array_key_exists('subject_id', $data)) { + $object->setSubjectId($data['subject_id']); + unset($data['subject_id']); } - } -} else { - class TeamSubjectResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class === $type; + if (\array_key_exists('subject_type', $data)) { + $object->setSubjectType($data['subject_type']); + unset($data['subject_type']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class === get_class($data); + if (\array_key_exists('team', $data)) { + $object->setTeam($data['team']); + unset($data['team']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TeamSubjectResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('subject_id', $data)) { - $object->setSubjectId($data['subject_id']); - unset($data['subject_id']); - } - if (\array_key_exists('subject_type', $data)) { - $object->setSubjectType($data['subject_type']); - unset($data['subject_type']); - } - if (\array_key_exists('team', $data)) { - $object->setTeam($data['team']); - unset($data['team']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['subject_id'] = $object->getSubjectId(); - $data['team'] = $object->getTeam(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['subject_id'] = $data->getSubjectId(); + $dataArray['team'] = $data->getTeam(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TeamSubjectResponse::class => false]; } } diff --git a/generated/Normalizer/TemplateCategoriesNormalizer.php b/generated/Normalizer/TemplateCategoriesNormalizer.php index 74e6bef..a0754af 100644 --- a/generated/Normalizer/TemplateCategoriesNormalizer.php +++ b/generated/Normalizer/TemplateCategoriesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,153 +20,75 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TemplateCategoriesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TemplateCategoriesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TemplateCategories::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TemplateCategories::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TemplateCategories::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TemplateCategories::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TemplateCategories(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('templates', $data)) { - $values = []; - foreach ($data['templates'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Template::class, 'json', $context); - } - $object->setTemplates($values); - unset($data['templates']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TemplateCategories(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TemplateCategories::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TemplateCategoriesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TemplateCategories::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TemplateCategories::class === get_class($data); - } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + if (\array_key_exists('templates', $data)) { + $values = []; + foreach ($data['templates'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Template::class, 'json', $context); } - $object = new \CedricZiel\Baserow\Generated\Model\TemplateCategories(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('templates', $data)) { - $values = []; - foreach ($data['templates'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Template::class, 'json', $context); - } - $object->setTemplates($values); - unset($data['templates']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $object->setTemplates($values); + unset($data['templates']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TemplateCategories::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TemplateCategories::class => false]; } } diff --git a/generated/Normalizer/TemplateNormalizer.php b/generated/Normalizer/TemplateNormalizer.php index 23b2e67..bd7ec30 100644 --- a/generated/Normalizer/TemplateNormalizer.php +++ b/generated/Normalizer/TemplateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,189 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Template::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Template::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Template::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Template::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Template(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('icon', $data)) { - $object->setIcon($data['icon']); - unset($data['icon']); - } - if (\array_key_exists('keywords', $data)) { - $object->setKeywords($data['keywords']); - unset($data['keywords']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { - $object->setWorkspaceId(null); - } - if (\array_key_exists('is_default', $data)) { - $object->setIsDefault($data['is_default']); - unset($data['is_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Template(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['icon'] = $object->getIcon(); - if ($object->isInitialized('keywords') && null !== $object->getKeywords()) { - $data['keywords'] = $object->getKeywords(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Template::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TemplateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Template::class === $type; + if (\array_key_exists('icon', $data)) { + $object->setIcon($data['icon']); + unset($data['icon']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Template::class === get_class($data); + if (\array_key_exists('keywords', $data)) { + $object->setKeywords($data['keywords']); + unset($data['keywords']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Template(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('icon', $data)) { - $object->setIcon($data['icon']); - unset($data['icon']); - } - if (\array_key_exists('keywords', $data)) { - $object->setKeywords($data['keywords']); - unset($data['keywords']); - } - if (\array_key_exists('group_id', $data)) { - $object->setGroupId($data['group_id']); - unset($data['group_id']); - } - if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { - $object->setWorkspaceId($data['workspace_id']); - unset($data['workspace_id']); - } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { - $object->setWorkspaceId(null); - } - if (\array_key_exists('is_default', $data)) { - $object->setIsDefault($data['is_default']); - unset($data['is_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('group_id', $data)) { + $object->setGroupId($data['group_id']); + unset($data['group_id']); + } + if (\array_key_exists('workspace_id', $data) && null !== $data['workspace_id']) { + $object->setWorkspaceId($data['workspace_id']); + unset($data['workspace_id']); + } elseif (\array_key_exists('workspace_id', $data) && null === $data['workspace_id']) { + $object->setWorkspaceId(null); + } + if (\array_key_exists('is_default', $data)) { + $object->setIsDefault($data['is_default']); + unset($data['is_default']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['icon'] = $object->getIcon(); - if ($object->isInitialized('keywords') && null !== $object->getKeywords()) { - $data['keywords'] = $object->getKeywords(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['icon'] = $data->getIcon(); + if ($data->isInitialized('keywords') && null !== $data->getKeywords()) { + $dataArray['keywords'] = $data->getKeywords(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Template::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Template::class => false]; } } diff --git a/generated/Normalizer/TextElementCreateElementNormalizer.php b/generated/Normalizer/TextElementCreateElementNormalizer.php index 67eaecb..ac1d541 100644 --- a/generated/Normalizer/TextElementCreateElementNormalizer.php +++ b/generated/Normalizer/TextElementCreateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,575 +20,286 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('format', $data)) { - $object->setFormat($data['format']); - unset($data['format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextElementCreateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('format') && null !== $object->getFormat()) { - $data['format'] = $object->getFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('before_id', $data)) { + $object->setBeforeId($data['before_id']); + unset($data['before_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('format', $data)) { + $object->setFormat($data['format']); + unset($data['format']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => false]; - } + return $object; } -} else { - class TextElementCreateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('beforeId') && null !== $data->getBeforeId()) { + $dataArray['before_id'] = $data->getBeforeId(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class === get_class($data); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('parentElementId') && null !== $data->getParentElementId()) { + $dataArray['parent_element_id'] = $data->getParentElementId(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementCreateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('before_id', $data)) { - $object->setBeforeId($data['before_id']); - unset($data['before_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('format', $data)) { - $object->setFormat($data['format']); - unset($data['format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('beforeId') && null !== $object->getBeforeId()) { - $data['before_id'] = $object->getBeforeId(); - } - $data['type'] = $object->getType(); - if ($object->isInitialized('parentElementId') && null !== $object->getParentElementId()) { - $data['parent_element_id'] = $object->getParentElementId(); - } - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('format') && null !== $object->getFormat()) { - $data['format'] = $object->getFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); + } + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); + } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('format') && null !== $data->getFormat()) { + $dataArray['format'] = $data->getFormat(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextElementCreateElement::class => false]; } } diff --git a/generated/Normalizer/TextElementCreateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/TextElementCreateElementStyleBackgroundFileNormalizer.php index 987b0ba..d7712e8 100644 --- a/generated/Normalizer/TextElementCreateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/TextElementCreateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class TextElementCreateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextElementCreateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/TextElementElementNormalizer.php b/generated/Normalizer/TextElementElementNormalizer.php index a592840..a4ad42c 100644 --- a/generated/Normalizer/TextElementElementNormalizer.php +++ b/generated/Normalizer/TextElementElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,605 +20,301 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextElementElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('format', $data)) { - $object->setFormat($data['format']); - unset($data['format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextElementElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('format') && null !== $object->getFormat()) { - $data['format'] = $object->getFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('page_id', $data)) { + $object->setPageId($data['page_id']); + unset($data['page_id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('format', $data)) { + $object->setFormat($data['format']); + unset($data['format']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementElement::class => false]; - } + return $object; } -} else { - class TextElementElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('page_id', $data)) { - $object->setPageId($data['page_id']); - unset($data['page_id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('format', $data)) { - $object->setFormat($data['format']); - unset($data['format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('format') && null !== $object->getFormat()) { - $data['format'] = $object->getFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('format') && null !== $data->getFormat()) { + $dataArray['format'] = $data->getFormat(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextElementElement::class => false]; } } diff --git a/generated/Normalizer/TextElementElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/TextElementElementStyleBackgroundFileNormalizer.php index 6bd808e..faa7a3b 100644 --- a/generated/Normalizer/TextElementElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/TextElementElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class TextElementElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextElementElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/TextElementPublicElementNormalizer.php b/generated/Normalizer/TextElementPublicElementNormalizer.php index 52c5d68..8be9247 100644 --- a/generated/Normalizer/TextElementPublicElementNormalizer.php +++ b/generated/Normalizer/TextElementPublicElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,597 +20,297 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('format', $data)) { - $object->setFormat($data['format']); - unset($data['format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextElementPublicElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('format') && null !== $object->getFormat()) { - $data['format'] = $object->getFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { + $object->setParentElementId($data['parent_element_id']); + unset($data['parent_element_id']); + } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { + $object->setParentElementId(null); + } + if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { + $object->setPlaceInContainer($data['place_in_container']); + unset($data['place_in_container']); + } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { + $object->setPlaceInContainer(null); + } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('format', $data)) { + $object->setFormat($data['format']); + unset($data['format']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => false]; - } + return $object; } -} else { - class TextElementPublicElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('placeInContainer') && null !== $data->getPlaceInContainer()) { + $dataArray['place_in_container'] = $data->getPlaceInContainer(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class === get_class($data); + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementPublicElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('parent_element_id', $data) && null !== $data['parent_element_id']) { - $object->setParentElementId($data['parent_element_id']); - unset($data['parent_element_id']); - } elseif (\array_key_exists('parent_element_id', $data) && null === $data['parent_element_id']) { - $object->setParentElementId(null); - } - if (\array_key_exists('place_in_container', $data) && null !== $data['place_in_container']) { - $object->setPlaceInContainer($data['place_in_container']); - unset($data['place_in_container']); - } elseif (\array_key_exists('place_in_container', $data) && null === $data['place_in_container']) { - $object->setPlaceInContainer(null); - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('format', $data)) { - $object->setFormat($data['format']); - unset($data['format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('placeInContainer') && null !== $object->getPlaceInContainer()) { - $data['place_in_container'] = $object->getPlaceInContainer(); - } - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('format') && null !== $object->getFormat()) { - $data['format'] = $object->getFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); + } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('format') && null !== $data->getFormat()) { + $dataArray['format'] = $data->getFormat(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextElementPublicElement::class => false]; } } diff --git a/generated/Normalizer/TextElementPublicElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/TextElementPublicElementStyleBackgroundFileNormalizer.php index 62ca1d2..c8f4317 100644 --- a/generated/Normalizer/TextElementPublicElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/TextElementPublicElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class TextElementPublicElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextElementPublicElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/TextElementUpdateElementNormalizer.php b/generated/Normalizer/TextElementUpdateElementNormalizer.php index e7133e8..a50f1af 100644 --- a/generated/Normalizer/TextElementUpdateElementNormalizer.php +++ b/generated/Normalizer/TextElementUpdateElementNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,543 +20,270 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('format', $data)) { - $object->setFormat($data['format']); - unset($data['format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('format') && null !== $object->getFormat()) { - $data['format'] = $object->getFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('visibility', $data)) { + $object->setVisibility($data['visibility']); + unset($data['visibility']); + } + if (\array_key_exists('styles', $data)) { + $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); + unset($data['styles']); + } + if (\array_key_exists('style_border_top_color', $data)) { + $object->setStyleBorderTopColor($data['style_border_top_color']); + unset($data['style_border_top_color']); + } + if (\array_key_exists('style_border_top_size', $data)) { + $object->setStyleBorderTopSize($data['style_border_top_size']); + unset($data['style_border_top_size']); + } + if (\array_key_exists('style_padding_top', $data)) { + $object->setStylePaddingTop($data['style_padding_top']); + unset($data['style_padding_top']); + } + if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { + $object->setStyleMarginTop($data['style_margin_top']); + unset($data['style_margin_top']); + } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { + $object->setStyleMarginTop(null); + } + if (\array_key_exists('style_border_bottom_color', $data)) { + $object->setStyleBorderBottomColor($data['style_border_bottom_color']); + unset($data['style_border_bottom_color']); + } + if (\array_key_exists('style_border_bottom_size', $data)) { + $object->setStyleBorderBottomSize($data['style_border_bottom_size']); + unset($data['style_border_bottom_size']); + } + if (\array_key_exists('style_padding_bottom', $data)) { + $object->setStylePaddingBottom($data['style_padding_bottom']); + unset($data['style_padding_bottom']); + } + if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { + $object->setStyleMarginBottom($data['style_margin_bottom']); + unset($data['style_margin_bottom']); + } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { + $object->setStyleMarginBottom(null); + } + if (\array_key_exists('style_border_left_color', $data)) { + $object->setStyleBorderLeftColor($data['style_border_left_color']); + unset($data['style_border_left_color']); + } + if (\array_key_exists('style_border_left_size', $data)) { + $object->setStyleBorderLeftSize($data['style_border_left_size']); + unset($data['style_border_left_size']); + } + if (\array_key_exists('style_padding_left', $data)) { + $object->setStylePaddingLeft($data['style_padding_left']); + unset($data['style_padding_left']); + } + if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { + $object->setStyleMarginLeft($data['style_margin_left']); + unset($data['style_margin_left']); + } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { + $object->setStyleMarginLeft(null); + } + if (\array_key_exists('style_border_right_color', $data)) { + $object->setStyleBorderRightColor($data['style_border_right_color']); + unset($data['style_border_right_color']); + } + if (\array_key_exists('style_border_right_size', $data)) { + $object->setStyleBorderRightSize($data['style_border_right_size']); + unset($data['style_border_right_size']); + } + if (\array_key_exists('style_padding_right', $data)) { + $object->setStylePaddingRight($data['style_padding_right']); + unset($data['style_padding_right']); + } + if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { + $object->setStyleMarginRight($data['style_margin_right']); + unset($data['style_margin_right']); + } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { + $object->setStyleMarginRight(null); + } + if (\array_key_exists('style_background', $data)) { + $object->setStyleBackground($data['style_background']); + unset($data['style_background']); + } + if (\array_key_exists('style_background_color', $data)) { + $object->setStyleBackgroundColor($data['style_background_color']); + unset($data['style_background_color']); + } + if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { + $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class, 'json', $context)); + unset($data['style_background_file']); + } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { + $object->setStyleBackgroundFile(null); + } + if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { + $object->setStyleBackgroundMode($data['style_background_mode']); + unset($data['style_background_mode']); + } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { + $object->setStyleBackgroundMode(null); + } + if (\array_key_exists('style_width', $data)) { + $object->setStyleWidth($data['style_width']); + unset($data['style_width']); + } + if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { + $object->setRoleType($data['role_type']); + unset($data['role_type']); + } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { + $object->setRoleType(null); + } + if (\array_key_exists('roles', $data) && null !== $data['roles']) { + $object->setRoles($data['roles']); + unset($data['roles']); + } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { + $object->setRoles(null); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('alignment', $data)) { + $object->setAlignment($data['alignment']); + unset($data['alignment']); + } + if (\array_key_exists('format', $data)) { + $object->setFormat($data['format']); + unset($data['format']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => false]; - } + return $object; } -} else { - class TextElementUpdateElementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('visibility') && null !== $data->getVisibility()) { + $dataArray['visibility'] = $data->getVisibility(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class === get_class($data); + if ($data->isInitialized('styles') && null !== $data->getStyles()) { + $dataArray['styles'] = $this->normalizer->normalize($data->getStyles(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementUpdateElement(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('visibility', $data)) { - $object->setVisibility($data['visibility']); - unset($data['visibility']); - } - if (\array_key_exists('styles', $data)) { - $object->setStyles($this->denormalizer->denormalize($data['styles'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class, 'json', $context)); - unset($data['styles']); - } - if (\array_key_exists('style_border_top_color', $data)) { - $object->setStyleBorderTopColor($data['style_border_top_color']); - unset($data['style_border_top_color']); - } - if (\array_key_exists('style_border_top_size', $data)) { - $object->setStyleBorderTopSize($data['style_border_top_size']); - unset($data['style_border_top_size']); - } - if (\array_key_exists('style_padding_top', $data)) { - $object->setStylePaddingTop($data['style_padding_top']); - unset($data['style_padding_top']); - } - if (\array_key_exists('style_margin_top', $data) && null !== $data['style_margin_top']) { - $object->setStyleMarginTop($data['style_margin_top']); - unset($data['style_margin_top']); - } elseif (\array_key_exists('style_margin_top', $data) && null === $data['style_margin_top']) { - $object->setStyleMarginTop(null); - } - if (\array_key_exists('style_border_bottom_color', $data)) { - $object->setStyleBorderBottomColor($data['style_border_bottom_color']); - unset($data['style_border_bottom_color']); - } - if (\array_key_exists('style_border_bottom_size', $data)) { - $object->setStyleBorderBottomSize($data['style_border_bottom_size']); - unset($data['style_border_bottom_size']); - } - if (\array_key_exists('style_padding_bottom', $data)) { - $object->setStylePaddingBottom($data['style_padding_bottom']); - unset($data['style_padding_bottom']); - } - if (\array_key_exists('style_margin_bottom', $data) && null !== $data['style_margin_bottom']) { - $object->setStyleMarginBottom($data['style_margin_bottom']); - unset($data['style_margin_bottom']); - } elseif (\array_key_exists('style_margin_bottom', $data) && null === $data['style_margin_bottom']) { - $object->setStyleMarginBottom(null); - } - if (\array_key_exists('style_border_left_color', $data)) { - $object->setStyleBorderLeftColor($data['style_border_left_color']); - unset($data['style_border_left_color']); - } - if (\array_key_exists('style_border_left_size', $data)) { - $object->setStyleBorderLeftSize($data['style_border_left_size']); - unset($data['style_border_left_size']); - } - if (\array_key_exists('style_padding_left', $data)) { - $object->setStylePaddingLeft($data['style_padding_left']); - unset($data['style_padding_left']); - } - if (\array_key_exists('style_margin_left', $data) && null !== $data['style_margin_left']) { - $object->setStyleMarginLeft($data['style_margin_left']); - unset($data['style_margin_left']); - } elseif (\array_key_exists('style_margin_left', $data) && null === $data['style_margin_left']) { - $object->setStyleMarginLeft(null); - } - if (\array_key_exists('style_border_right_color', $data)) { - $object->setStyleBorderRightColor($data['style_border_right_color']); - unset($data['style_border_right_color']); - } - if (\array_key_exists('style_border_right_size', $data)) { - $object->setStyleBorderRightSize($data['style_border_right_size']); - unset($data['style_border_right_size']); - } - if (\array_key_exists('style_padding_right', $data)) { - $object->setStylePaddingRight($data['style_padding_right']); - unset($data['style_padding_right']); - } - if (\array_key_exists('style_margin_right', $data) && null !== $data['style_margin_right']) { - $object->setStyleMarginRight($data['style_margin_right']); - unset($data['style_margin_right']); - } elseif (\array_key_exists('style_margin_right', $data) && null === $data['style_margin_right']) { - $object->setStyleMarginRight(null); - } - if (\array_key_exists('style_background', $data)) { - $object->setStyleBackground($data['style_background']); - unset($data['style_background']); - } - if (\array_key_exists('style_background_color', $data)) { - $object->setStyleBackgroundColor($data['style_background_color']); - unset($data['style_background_color']); - } - if (\array_key_exists('style_background_file', $data) && null !== $data['style_background_file']) { - $object->setStyleBackgroundFile($this->denormalizer->denormalize($data['style_background_file'], \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class, 'json', $context)); - unset($data['style_background_file']); - } elseif (\array_key_exists('style_background_file', $data) && null === $data['style_background_file']) { - $object->setStyleBackgroundFile(null); - } - if (\array_key_exists('style_background_mode', $data) && null !== $data['style_background_mode']) { - $object->setStyleBackgroundMode($data['style_background_mode']); - unset($data['style_background_mode']); - } elseif (\array_key_exists('style_background_mode', $data) && null === $data['style_background_mode']) { - $object->setStyleBackgroundMode(null); - } - if (\array_key_exists('style_width', $data)) { - $object->setStyleWidth($data['style_width']); - unset($data['style_width']); - } - if (\array_key_exists('role_type', $data) && null !== $data['role_type']) { - $object->setRoleType($data['role_type']); - unset($data['role_type']); - } elseif (\array_key_exists('role_type', $data) && null === $data['role_type']) { - $object->setRoleType(null); - } - if (\array_key_exists('roles', $data) && null !== $data['roles']) { - $object->setRoles($data['roles']); - unset($data['roles']); - } elseif (\array_key_exists('roles', $data) && null === $data['roles']) { - $object->setRoles(null); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('alignment', $data)) { - $object->setAlignment($data['alignment']); - unset($data['alignment']); - } - if (\array_key_exists('format', $data)) { - $object->setFormat($data['format']); - unset($data['format']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('styleBorderTopColor') && null !== $data->getStyleBorderTopColor()) { + $dataArray['style_border_top_color'] = $data->getStyleBorderTopColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('visibility') && null !== $object->getVisibility()) { - $data['visibility'] = $object->getVisibility(); - } - if ($object->isInitialized('styles') && null !== $object->getStyles()) { - $data['styles'] = $this->normalizer->normalize($object->getStyles(), 'json', $context); - } - if ($object->isInitialized('styleBorderTopColor') && null !== $object->getStyleBorderTopColor()) { - $data['style_border_top_color'] = $object->getStyleBorderTopColor(); - } - if ($object->isInitialized('styleBorderTopSize') && null !== $object->getStyleBorderTopSize()) { - $data['style_border_top_size'] = $object->getStyleBorderTopSize(); - } - if ($object->isInitialized('stylePaddingTop') && null !== $object->getStylePaddingTop()) { - $data['style_padding_top'] = $object->getStylePaddingTop(); - } - if ($object->isInitialized('styleMarginTop') && null !== $object->getStyleMarginTop()) { - $data['style_margin_top'] = $object->getStyleMarginTop(); - } - if ($object->isInitialized('styleBorderBottomColor') && null !== $object->getStyleBorderBottomColor()) { - $data['style_border_bottom_color'] = $object->getStyleBorderBottomColor(); - } - if ($object->isInitialized('styleBorderBottomSize') && null !== $object->getStyleBorderBottomSize()) { - $data['style_border_bottom_size'] = $object->getStyleBorderBottomSize(); - } - if ($object->isInitialized('stylePaddingBottom') && null !== $object->getStylePaddingBottom()) { - $data['style_padding_bottom'] = $object->getStylePaddingBottom(); - } - if ($object->isInitialized('styleMarginBottom') && null !== $object->getStyleMarginBottom()) { - $data['style_margin_bottom'] = $object->getStyleMarginBottom(); - } - if ($object->isInitialized('styleBorderLeftColor') && null !== $object->getStyleBorderLeftColor()) { - $data['style_border_left_color'] = $object->getStyleBorderLeftColor(); - } - if ($object->isInitialized('styleBorderLeftSize') && null !== $object->getStyleBorderLeftSize()) { - $data['style_border_left_size'] = $object->getStyleBorderLeftSize(); - } - if ($object->isInitialized('stylePaddingLeft') && null !== $object->getStylePaddingLeft()) { - $data['style_padding_left'] = $object->getStylePaddingLeft(); - } - if ($object->isInitialized('styleMarginLeft') && null !== $object->getStyleMarginLeft()) { - $data['style_margin_left'] = $object->getStyleMarginLeft(); - } - if ($object->isInitialized('styleBorderRightColor') && null !== $object->getStyleBorderRightColor()) { - $data['style_border_right_color'] = $object->getStyleBorderRightColor(); - } - if ($object->isInitialized('styleBorderRightSize') && null !== $object->getStyleBorderRightSize()) { - $data['style_border_right_size'] = $object->getStyleBorderRightSize(); - } - if ($object->isInitialized('stylePaddingRight') && null !== $object->getStylePaddingRight()) { - $data['style_padding_right'] = $object->getStylePaddingRight(); - } - if ($object->isInitialized('styleMarginRight') && null !== $object->getStyleMarginRight()) { - $data['style_margin_right'] = $object->getStyleMarginRight(); - } - if ($object->isInitialized('styleBackground') && null !== $object->getStyleBackground()) { - $data['style_background'] = $object->getStyleBackground(); - } - if ($object->isInitialized('styleBackgroundColor') && null !== $object->getStyleBackgroundColor()) { - $data['style_background_color'] = $object->getStyleBackgroundColor(); - } - if ($object->isInitialized('styleBackgroundFile') && null !== $object->getStyleBackgroundFile()) { - $data['style_background_file'] = $this->normalizer->normalize($object->getStyleBackgroundFile(), 'json', $context); - } - if ($object->isInitialized('styleBackgroundMode') && null !== $object->getStyleBackgroundMode()) { - $data['style_background_mode'] = $object->getStyleBackgroundMode(); - } - if ($object->isInitialized('styleWidth') && null !== $object->getStyleWidth()) { - $data['style_width'] = $object->getStyleWidth(); - } - if ($object->isInitialized('roleType') && null !== $object->getRoleType()) { - $data['role_type'] = $object->getRoleType(); - } - if ($object->isInitialized('roles') && null !== $object->getRoles()) { - $data['roles'] = $object->getRoles(); - } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('alignment') && null !== $object->getAlignment()) { - $data['alignment'] = $object->getAlignment(); - } - if ($object->isInitialized('format') && null !== $object->getFormat()) { - $data['format'] = $object->getFormat(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('styleBorderTopSize') && null !== $data->getStyleBorderTopSize()) { + $dataArray['style_border_top_size'] = $data->getStyleBorderTopSize(); + } + if ($data->isInitialized('stylePaddingTop') && null !== $data->getStylePaddingTop()) { + $dataArray['style_padding_top'] = $data->getStylePaddingTop(); + } + if ($data->isInitialized('styleMarginTop') && null !== $data->getStyleMarginTop()) { + $dataArray['style_margin_top'] = $data->getStyleMarginTop(); + } + if ($data->isInitialized('styleBorderBottomColor') && null !== $data->getStyleBorderBottomColor()) { + $dataArray['style_border_bottom_color'] = $data->getStyleBorderBottomColor(); + } + if ($data->isInitialized('styleBorderBottomSize') && null !== $data->getStyleBorderBottomSize()) { + $dataArray['style_border_bottom_size'] = $data->getStyleBorderBottomSize(); + } + if ($data->isInitialized('stylePaddingBottom') && null !== $data->getStylePaddingBottom()) { + $dataArray['style_padding_bottom'] = $data->getStylePaddingBottom(); + } + if ($data->isInitialized('styleMarginBottom') && null !== $data->getStyleMarginBottom()) { + $dataArray['style_margin_bottom'] = $data->getStyleMarginBottom(); + } + if ($data->isInitialized('styleBorderLeftColor') && null !== $data->getStyleBorderLeftColor()) { + $dataArray['style_border_left_color'] = $data->getStyleBorderLeftColor(); + } + if ($data->isInitialized('styleBorderLeftSize') && null !== $data->getStyleBorderLeftSize()) { + $dataArray['style_border_left_size'] = $data->getStyleBorderLeftSize(); + } + if ($data->isInitialized('stylePaddingLeft') && null !== $data->getStylePaddingLeft()) { + $dataArray['style_padding_left'] = $data->getStylePaddingLeft(); + } + if ($data->isInitialized('styleMarginLeft') && null !== $data->getStyleMarginLeft()) { + $dataArray['style_margin_left'] = $data->getStyleMarginLeft(); + } + if ($data->isInitialized('styleBorderRightColor') && null !== $data->getStyleBorderRightColor()) { + $dataArray['style_border_right_color'] = $data->getStyleBorderRightColor(); + } + if ($data->isInitialized('styleBorderRightSize') && null !== $data->getStyleBorderRightSize()) { + $dataArray['style_border_right_size'] = $data->getStyleBorderRightSize(); + } + if ($data->isInitialized('stylePaddingRight') && null !== $data->getStylePaddingRight()) { + $dataArray['style_padding_right'] = $data->getStylePaddingRight(); + } + if ($data->isInitialized('styleMarginRight') && null !== $data->getStyleMarginRight()) { + $dataArray['style_margin_right'] = $data->getStyleMarginRight(); + } + if ($data->isInitialized('styleBackground') && null !== $data->getStyleBackground()) { + $dataArray['style_background'] = $data->getStyleBackground(); + } + if ($data->isInitialized('styleBackgroundColor') && null !== $data->getStyleBackgroundColor()) { + $dataArray['style_background_color'] = $data->getStyleBackgroundColor(); + } + if ($data->isInitialized('styleBackgroundFile') && null !== $data->getStyleBackgroundFile()) { + $dataArray['style_background_file'] = $this->normalizer->normalize($data->getStyleBackgroundFile(), 'json', $context); + } + if ($data->isInitialized('styleBackgroundMode') && null !== $data->getStyleBackgroundMode()) { + $dataArray['style_background_mode'] = $data->getStyleBackgroundMode(); + } + if ($data->isInitialized('styleWidth') && null !== $data->getStyleWidth()) { + $dataArray['style_width'] = $data->getStyleWidth(); + } + if ($data->isInitialized('roleType') && null !== $data->getRoleType()) { + $dataArray['role_type'] = $data->getRoleType(); + } + if ($data->isInitialized('roles') && null !== $data->getRoles()) { + $dataArray['roles'] = $data->getRoles(); + } + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); + } + if ($data->isInitialized('alignment') && null !== $data->getAlignment()) { + $dataArray['alignment'] = $data->getAlignment(); + } + if ($data->isInitialized('format') && null !== $data->getFormat()) { + $dataArray['format'] = $data->getFormat(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextElementUpdateElement::class => false]; } } diff --git a/generated/Normalizer/TextElementUpdateElementStyleBackgroundFileNormalizer.php b/generated/Normalizer/TextElementUpdateElementStyleBackgroundFileNormalizer.php index de3f0f1..3307138 100644 --- a/generated/Normalizer/TextElementUpdateElementStyleBackgroundFileNormalizer.php +++ b/generated/Normalizer/TextElementUpdateElementStyleBackgroundFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => false]; - } + return $object; } -} else { - class TextElementUpdateElementStyleBackgroundFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextElementUpdateElementStyleBackgroundFile::class => false]; } } diff --git a/generated/Normalizer/TextFieldCreateFieldNormalizer.php b/generated/Normalizer/TextFieldCreateFieldNormalizer.php index 7f78bd5..5818b90 100644 --- a/generated/Normalizer/TextFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/TextFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('text_default', $data)) { - $object->setTextDefault($data['text_default']); - unset($data['text_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('textDefault') && null !== $object->getTextDefault()) { - $data['text_default'] = $object->getTextDefault(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('text_default', $data)) { + $object->setTextDefault($data['text_default']); + unset($data['text_default']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => false]; - } + return $object; } -} else { - class TextFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class === get_class($data); + if ($data->isInitialized('textDefault') && null !== $data->getTextDefault()) { + $dataArray['text_default'] = $data->getTextDefault(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('text_default', $data)) { - $object->setTextDefault($data['text_default']); - unset($data['text_default']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('textDefault') && null !== $object->getTextDefault()) { - $data['text_default'] = $object->getTextDefault(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/TextFieldFieldNormalizer.php b/generated/Normalizer/TextFieldFieldNormalizer.php index 3d0c8cc..58f5f90 100644 --- a/generated/Normalizer/TextFieldFieldNormalizer.php +++ b/generated/Normalizer/TextFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,217 +20,113 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('text_default', $data)) { - $object->setTextDefault($data['text_default']); - unset($data['text_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('textDefault') && null !== $object->getTextDefault()) { - $data['text_default'] = $object->getTextDefault(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('text_default', $data)) { + $object->setTextDefault($data['text_default']); + unset($data['text_default']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextFieldField::class => false]; - } + return $object; } -} else { - class TextFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('text_default', $data)) { - $object->setTextDefault($data['text_default']); - unset($data['text_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('textDefault') && null !== $data->getTextDefault()) { + $dataArray['text_default'] = $data->getTextDefault(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('textDefault') && null !== $object->getTextDefault()) { - $data['text_default'] = $object->getTextDefault(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextFieldField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextFieldField::class => false]; } } diff --git a/generated/Normalizer/TextFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/TextFieldFieldSerializerWithRelatedFieldsNormalizer.php index 18a4a75..2bb471e 100644 --- a/generated/Normalizer/TextFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/TextFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,233 +20,121 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('text_default', $data)) { - $object->setTextDefault($data['text_default']); - unset($data['text_default']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('textDefault') && null !== $object->getTextDefault()) { - $data['text_default'] = $object->getTextDefault(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + if (\array_key_exists('text_default', $data)) { + $object->setTextDefault($data['text_default']); + unset($data['text_default']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class TextFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - if (\array_key_exists('text_default', $data)) { - $object->setTextDefault($data['text_default']); - unset($data['text_default']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('textDefault') && null !== $data->getTextDefault()) { + $dataArray['text_default'] = $data->getTextDefault(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('textDefault') && null !== $object->getTextDefault()) { - $data['text_default'] = $object->getTextDefault(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/TextFieldUpdateFieldNormalizer.php b/generated/Normalizer/TextFieldUpdateFieldNormalizer.php index bde6e68..477bf6c 100644 --- a/generated/Normalizer/TextFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/TextFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,179 +20,88 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TextFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TextFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('text_default', $data)) { - $object->setTextDefault($data['text_default']); - unset($data['text_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('textDefault') && null !== $object->getTextDefault()) { - $data['text_default'] = $object->getTextDefault(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('text_default', $data)) { + $object->setTextDefault($data['text_default']); + unset($data['text_default']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => false]; - } + return $object; } -} else { - class TextFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TextFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('text_default', $data)) { - $object->setTextDefault($data['text_default']); - unset($data['text_default']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - if ($object->isInitialized('textDefault') && null !== $object->getTextDefault()) { - $data['text_default'] = $object->getTextDefault(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('textDefault') && null !== $data->getTextDefault()) { + $dataArray['text_default'] = $data->getTextDefault(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TextFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/TokenBlacklistNormalizer.php b/generated/Normalizer/TokenBlacklistNormalizer.php index ab9b9d9..4b7df72 100644 --- a/generated/Normalizer/TokenBlacklistNormalizer.php +++ b/generated/Normalizer/TokenBlacklistNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TokenBlacklistNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TokenBlacklistNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenBlacklist(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('refresh', $data)) { - $object->setRefresh($data['refresh']); - unset($data['refresh']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TokenBlacklist(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['refresh'] = $object->getRefresh(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('refresh', $data)) { + $object->setRefresh($data['refresh']); + unset($data['refresh']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => false]; - } + return $object; } -} else { - class TokenBlacklistNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenBlacklist::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenBlacklist(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('refresh', $data)) { - $object->setRefresh($data['refresh']); - unset($data['refresh']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['refresh'] = $data->getRefresh(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['refresh'] = $object->getRefresh(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TokenBlacklist::class => false]; } } diff --git a/generated/Normalizer/TokenCreateNormalizer.php b/generated/Normalizer/TokenCreateNormalizer.php index 8101816..78b6156 100644 --- a/generated/Normalizer/TokenCreateNormalizer.php +++ b/generated/Normalizer/TokenCreateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,147 +20,72 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TokenCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TokenCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TokenCreate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenCreate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenCreate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenCreate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenCreate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['workspace'] = $object->getWorkspace(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\TokenCreate(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenCreate::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TokenCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenCreate::class === $type; + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenCreate::class === get_class($data); + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenCreate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['workspace'] = $object->getWorkspace(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['workspace'] = $data->getWorkspace(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenCreate::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TokenCreate::class => false]; } } diff --git a/generated/Normalizer/TokenNormalizer.php b/generated/Normalizer/TokenNormalizer.php index 06e998f..900f3da 100644 --- a/generated/Normalizer/TokenNormalizer.php +++ b/generated/Normalizer/TokenNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TokenNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TokenNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Token::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Token::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Token::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Token::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Token(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('key', $data)) { - $object->setKey($data['key']); - unset($data['key']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($this->denormalizer->denormalize($data['permissions'], \CedricZiel\Baserow\Generated\Model\TokenPermissions::class, 'json', $context)); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\Token(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['workspace'] = $object->getWorkspace(); - $data['key'] = $object->getKey(); - $data['permissions'] = $this->normalizer->normalize($object->getPermissions(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Token::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TokenNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Token::class === $type; + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Token::class === get_class($data); + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Token(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('key', $data)) { - $object->setKey($data['key']); - unset($data['key']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($this->denormalizer->denormalize($data['permissions'], \CedricZiel\Baserow\Generated\Model\TokenPermissions::class, 'json', $context)); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('key', $data)) { + $object->setKey($data['key']); + unset($data['key']); + } + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($this->denormalizer->denormalize($data['permissions'], \CedricZiel\Baserow\Generated\Model\TokenPermissions::class, 'json', $context)); + unset($data['permissions']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['workspace'] = $object->getWorkspace(); - $data['key'] = $object->getKey(); - $data['permissions'] = $this->normalizer->normalize($object->getPermissions(), 'json', $context); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['workspace'] = $data->getWorkspace(); + $dataArray['key'] = $data->getKey(); + $dataArray['permissions'] = $this->normalizer->normalize($data->getPermissions(), 'json', $context); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Token::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Token::class => false]; } } diff --git a/generated/Normalizer/TokenObtainPairNormalizer.php b/generated/Normalizer/TokenObtainPairNormalizer.php index aa1d901..b1caa26 100644 --- a/generated/Normalizer/TokenObtainPairNormalizer.php +++ b/generated/Normalizer/TokenObtainPairNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TokenObtainPairNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TokenObtainPairNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenObtainPair(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - if (\array_key_exists('access', $data)) { - $object->setAccess($data['access']); - unset($data['access']); - } - if (\array_key_exists('refresh', $data)) { - $object->setRefresh($data['refresh']); - unset($data['refresh']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TokenObtainPair(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['username'] = $object->getUsername(); - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => false]; + if (\array_key_exists('password', $data)) { + $object->setPassword($data['password']); + unset($data['password']); } - } -} else { - class TokenObtainPairNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class === $type; + if (\array_key_exists('access', $data)) { + $object->setAccess($data['access']); + unset($data['access']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenObtainPair::class === get_class($data); + if (\array_key_exists('refresh', $data)) { + $object->setRefresh($data['refresh']); + unset($data['refresh']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenObtainPair(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - if (\array_key_exists('access', $data)) { - $object->setAccess($data['access']); - unset($data['access']); - } - if (\array_key_exists('refresh', $data)) { - $object->setRefresh($data['refresh']); - unset($data['refresh']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['username'] = $object->getUsername(); - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['username'] = $data->getUsername(); + $dataArray['password'] = $data->getPassword(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TokenObtainPair::class => false]; } } diff --git a/generated/Normalizer/TokenObtainPairWithUserNormalizer.php b/generated/Normalizer/TokenObtainPairWithUserNormalizer.php index 113cfa3..ac5f0be 100644 --- a/generated/Normalizer/TokenObtainPairWithUserNormalizer.php +++ b/generated/Normalizer/TokenObtainPairWithUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TokenObtainPairWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TokenObtainPairWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('email') && null !== $object->getEmail()) { - $data['email'] = $object->getEmail(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('password', $data)) { + $object->setPassword($data['password']); + unset($data['password']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => false]; - } + return $object; } -} else { - class TokenObtainPairWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('email') && null !== $data->getEmail()) { + $dataArray['email'] = $data->getEmail(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class === get_class($data); + if ($data->isInitialized('username') && null !== $data->getUsername()) { + $dataArray['username'] = $data->getUsername(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); + $dataArray['password'] = $data->getPassword(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('email') && null !== $object->getEmail()) { - $data['email'] = $object->getEmail(); - } - if ($object->isInitialized('username') && null !== $object->getUsername()) { - $data['username'] = $object->getUsername(); - } - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TokenObtainPairWithUser::class => false]; } } diff --git a/generated/Normalizer/TokenPermissionsNormalizer.php b/generated/Normalizer/TokenPermissionsNormalizer.php index f906e89..ea1758b 100644 --- a/generated/Normalizer/TokenPermissionsNormalizer.php +++ b/generated/Normalizer/TokenPermissionsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TokenPermissionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TokenPermissionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TokenPermissions::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenPermissions::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenPermissions::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenPermissions::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenPermissions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('create', $data)) { - $object->setCreate($data['create']); - unset($data['create']); - } - if (\array_key_exists('read', $data)) { - $object->setRead($data['read']); - unset($data['read']); - } - if (\array_key_exists('update', $data)) { - $object->setUpdate($data['update']); - unset($data['update']); - } - if (\array_key_exists('delete', $data)) { - $object->setDelete($data['delete']); - unset($data['delete']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TokenPermissions(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('create') && null !== $object->getCreate()) { - $data['create'] = $object->getCreate(); - } - if ($object->isInitialized('read') && null !== $object->getRead()) { - $data['read'] = $object->getRead(); - } - if ($object->isInitialized('update') && null !== $object->getUpdate()) { - $data['update'] = $object->getUpdate(); - } - if ($object->isInitialized('delete') && null !== $object->getDelete()) { - $data['delete'] = $object->getDelete(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('create', $data)) { + $object->setCreate($data['create']); + unset($data['create']); + } + if (\array_key_exists('read', $data)) { + $object->setRead($data['read']); + unset($data['read']); + } + if (\array_key_exists('update', $data)) { + $object->setUpdate($data['update']); + unset($data['update']); + } + if (\array_key_exists('delete', $data)) { + $object->setDelete($data['delete']); + unset($data['delete']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenPermissions::class => false]; - } + return $object; } -} else { - class TokenPermissionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenPermissions::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('create') && null !== $data->getCreate()) { + $dataArray['create'] = $data->getCreate(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenPermissions::class === get_class($data); + if ($data->isInitialized('read') && null !== $data->getRead()) { + $dataArray['read'] = $data->getRead(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenPermissions(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('create', $data)) { - $object->setCreate($data['create']); - unset($data['create']); - } - if (\array_key_exists('read', $data)) { - $object->setRead($data['read']); - unset($data['read']); - } - if (\array_key_exists('update', $data)) { - $object->setUpdate($data['update']); - unset($data['update']); - } - if (\array_key_exists('delete', $data)) { - $object->setDelete($data['delete']); - unset($data['delete']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('update') && null !== $data->getUpdate()) { + $dataArray['update'] = $data->getUpdate(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('create') && null !== $object->getCreate()) { - $data['create'] = $object->getCreate(); - } - if ($object->isInitialized('read') && null !== $object->getRead()) { - $data['read'] = $object->getRead(); - } - if ($object->isInitialized('update') && null !== $object->getUpdate()) { - $data['update'] = $object->getUpdate(); - } - if ($object->isInitialized('delete') && null !== $object->getDelete()) { - $data['delete'] = $object->getDelete(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('delete') && null !== $data->getDelete()) { + $dataArray['delete'] = $data->getDelete(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenPermissions::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TokenPermissions::class => false]; } } diff --git a/generated/Normalizer/TokenRefreshWithUserNormalizer.php b/generated/Normalizer/TokenRefreshWithUserNormalizer.php index 282b1fa..7c0fa61 100644 --- a/generated/Normalizer/TokenRefreshWithUserNormalizer.php +++ b/generated/Normalizer/TokenRefreshWithUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TokenRefreshWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TokenRefreshWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access', $data)) { - $object->setAccess($data['access']); - unset($data['access']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('access', $data)) { + $object->setAccess($data['access']); + unset($data['access']); + } + if (\array_key_exists('refresh_token', $data)) { + $object->setRefreshToken($data['refresh_token']); + unset($data['refresh_token']); + } + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => false]; - } + return $object; } -} else { - class TokenRefreshWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('refreshToken') && null !== $data->getRefreshToken()) { + $dataArray['refresh_token'] = $data->getRefreshToken(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class === get_class($data); + if ($data->isInitialized('token') && null !== $data->getToken()) { + $dataArray['token'] = $data->getToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('access', $data)) { - $object->setAccess($data['access']); - unset($data['access']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('refreshToken') && null !== $object->getRefreshToken()) { - $data['refresh_token'] = $object->getRefreshToken(); - } - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TokenRefreshWithUser::class => false]; } } diff --git a/generated/Normalizer/TokenVerifyWithUserNormalizer.php b/generated/Normalizer/TokenVerifyWithUserNormalizer.php index 8d7dee9..f65655b 100644 --- a/generated/Normalizer/TokenVerifyWithUserNormalizer.php +++ b/generated/Normalizer/TokenVerifyWithUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,143 +20,70 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TokenVerifyWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TokenVerifyWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - $data['refresh_token'] = $object->getRefreshToken(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); + } + if (\array_key_exists('refresh_token', $data)) { + $object->setRefreshToken($data['refresh_token']); + unset($data['refresh_token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => false]; - } + return $object; } -} else { - class TokenVerifyWithUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('token') && null !== $data->getToken()) { + $dataArray['token'] = $data->getToken(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - if (\array_key_exists('refresh_token', $data)) { - $object->setRefreshToken($data['refresh_token']); - unset($data['refresh_token']); + $dataArray['refresh_token'] = $data->getRefreshToken(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('token') && null !== $object->getToken()) { - $data['token'] = $object->getToken(); - } - $data['refresh_token'] = $object->getRefreshToken(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TokenVerifyWithUser::class => false]; } } diff --git a/generated/Normalizer/TrashContentsNormalizer.php b/generated/Normalizer/TrashContentsNormalizer.php index a85cf98..bd5ba63 100644 --- a/generated/Normalizer/TrashContentsNormalizer.php +++ b/generated/Normalizer/TrashContentsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,275 +20,136 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TrashContentsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TrashContentsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TrashContents::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TrashContents::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashContents::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashContents::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TrashContents(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('user_who_trashed', $data)) { - $object->setUserWhoTrashed($data['user_who_trashed']); - unset($data['user_who_trashed']); - } - if (\array_key_exists('trash_item_type', $data)) { - $object->setTrashItemType($data['trash_item_type']); - unset($data['trash_item_type']); - } - if (\array_key_exists('trash_item_id', $data)) { - $object->setTrashItemId($data['trash_item_id']); - unset($data['trash_item_id']); - } - if (\array_key_exists('parent_trash_item_id', $data) && null !== $data['parent_trash_item_id']) { - $object->setParentTrashItemId($data['parent_trash_item_id']); - unset($data['parent_trash_item_id']); - } elseif (\array_key_exists('parent_trash_item_id', $data) && null === $data['parent_trash_item_id']) { - $object->setParentTrashItemId(null); - } - if (\array_key_exists('trashed_at', $data)) { - $object->setTrashedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['trashed_at'])); - unset($data['trashed_at']); - } - if (\array_key_exists('application', $data) && null !== $data['application']) { - $object->setApplication($data['application']); - unset($data['application']); - } elseif (\array_key_exists('application', $data) && null === $data['application']) { - $object->setApplication(null); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('names', $data) && null !== $data['names']) { - $values = []; - foreach ($data['names'] as $value) { - $values[] = $value; - } - $object->setNames($values); - unset($data['names']); - } elseif (\array_key_exists('names', $data) && null === $data['names']) { - $object->setNames(null); - } - if (\array_key_exists('parent_name', $data) && null !== $data['parent_name']) { - $object->setParentName($data['parent_name']); - unset($data['parent_name']); - } elseif (\array_key_exists('parent_name', $data) && null === $data['parent_name']) { - $object->setParentName(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TrashContents(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['trash_item_id'] = $object->getTrashItemId(); - $data['parent_trash_item_id'] = $object->getParentTrashItemId(); - if ($object->isInitialized('application') && null !== $object->getApplication()) { - $data['application'] = $object->getApplication(); - } - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - $data['name'] = $object->getName(); - if ($object->isInitialized('names') && null !== $object->getNames()) { - $values = []; - foreach ($object->getNames() as $value) { - $values[] = $value; - } - $data['names'] = $values; - } - if ($object->isInitialized('parentName') && null !== $object->getParentName()) { - $data['parent_name'] = $object->getParentName(); - } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('user_who_trashed', $data)) { + $object->setUserWhoTrashed($data['user_who_trashed']); + unset($data['user_who_trashed']); + } + if (\array_key_exists('trash_item_type', $data)) { + $object->setTrashItemType($data['trash_item_type']); + unset($data['trash_item_type']); + } + if (\array_key_exists('trash_item_id', $data)) { + $object->setTrashItemId($data['trash_item_id']); + unset($data['trash_item_id']); + } + if (\array_key_exists('parent_trash_item_id', $data) && null !== $data['parent_trash_item_id']) { + $object->setParentTrashItemId($data['parent_trash_item_id']); + unset($data['parent_trash_item_id']); + } elseif (\array_key_exists('parent_trash_item_id', $data) && null === $data['parent_trash_item_id']) { + $object->setParentTrashItemId(null); + } + if (\array_key_exists('trashed_at', $data)) { + $object->setTrashedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['trashed_at'])); + unset($data['trashed_at']); + } + if (\array_key_exists('application', $data) && null !== $data['application']) { + $object->setApplication($data['application']); + unset($data['application']); + } elseif (\array_key_exists('application', $data) && null === $data['application']) { + $object->setApplication(null); + } + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); + } + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('names', $data) && null !== $data['names']) { + $values = []; + foreach ($data['names'] as $value) { + $values[] = $value; + } + $object->setNames($values); + unset($data['names']); + } elseif (\array_key_exists('names', $data) && null === $data['names']) { + $object->setNames(null); + } + if (\array_key_exists('parent_name', $data) && null !== $data['parent_name']) { + $object->setParentName($data['parent_name']); + unset($data['parent_name']); + } elseif (\array_key_exists('parent_name', $data) && null === $data['parent_name']) { + $object->setParentName(null); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TrashContents::class => false]; - } + return $object; } -} else { - class TrashContentsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TrashContents::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['trash_item_id'] = $data->getTrashItemId(); + $dataArray['parent_trash_item_id'] = $data->getParentTrashItemId(); + if ($data->isInitialized('application') && null !== $data->getApplication()) { + $dataArray['application'] = $data->getApplication(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashContents::class === get_class($data); + $dataArray['group'] = $data->getGroup(); + $dataArray['workspace'] = $data->getWorkspace(); + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('names') && null !== $data->getNames()) { + $values = []; + foreach ($data->getNames() as $value) { + $values[] = $value; + } + $dataArray['names'] = $values; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TrashContents(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('user_who_trashed', $data)) { - $object->setUserWhoTrashed($data['user_who_trashed']); - unset($data['user_who_trashed']); - } - if (\array_key_exists('trash_item_type', $data)) { - $object->setTrashItemType($data['trash_item_type']); - unset($data['trash_item_type']); - } - if (\array_key_exists('trash_item_id', $data)) { - $object->setTrashItemId($data['trash_item_id']); - unset($data['trash_item_id']); - } - if (\array_key_exists('parent_trash_item_id', $data) && null !== $data['parent_trash_item_id']) { - $object->setParentTrashItemId($data['parent_trash_item_id']); - unset($data['parent_trash_item_id']); - } elseif (\array_key_exists('parent_trash_item_id', $data) && null === $data['parent_trash_item_id']) { - $object->setParentTrashItemId(null); - } - if (\array_key_exists('trashed_at', $data)) { - $object->setTrashedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['trashed_at'])); - unset($data['trashed_at']); - } - if (\array_key_exists('application', $data) && null !== $data['application']) { - $object->setApplication($data['application']); - unset($data['application']); - } elseif (\array_key_exists('application', $data) && null === $data['application']) { - $object->setApplication(null); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('names', $data) && null !== $data['names']) { - $values = []; - foreach ($data['names'] as $value) { - $values[] = $value; - } - $object->setNames($values); - unset($data['names']); - } elseif (\array_key_exists('names', $data) && null === $data['names']) { - $object->setNames(null); - } - if (\array_key_exists('parent_name', $data) && null !== $data['parent_name']) { - $object->setParentName($data['parent_name']); - unset($data['parent_name']); - } elseif (\array_key_exists('parent_name', $data) && null === $data['parent_name']) { - $object->setParentName(null); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; + if ($data->isInitialized('parentName') && null !== $data->getParentName()) { + $dataArray['parent_name'] = $data->getParentName(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['trash_item_id'] = $object->getTrashItemId(); - $data['parent_trash_item_id'] = $object->getParentTrashItemId(); - if ($object->isInitialized('application') && null !== $object->getApplication()) { - $data['application'] = $object->getApplication(); - } - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - $data['name'] = $object->getName(); - if ($object->isInitialized('names') && null !== $object->getNames()) { - $values = []; - foreach ($object->getNames() as $value) { - $values[] = $value; - } - $data['names'] = $values; - } - if ($object->isInitialized('parentName') && null !== $object->getParentName()) { - $data['parent_name'] = $object->getParentName(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TrashContents::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TrashContents::class => false]; } } diff --git a/generated/Normalizer/TrashStructureApplicationNormalizer.php b/generated/Normalizer/TrashStructureApplicationNormalizer.php index 95b30be..0450dfc 100644 --- a/generated/Normalizer/TrashStructureApplicationNormalizer.php +++ b/generated/Normalizer/TrashStructureApplicationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,151 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TrashStructureApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TrashStructureApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TrashStructureApplication(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('trashed', $data)) { - $object->setTrashed($data['trashed']); - unset($data['trashed']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TrashStructureApplication(); + if (\array_key_exists('trashed', $data) && \is_int($data['trashed'])) { + $data['trashed'] = (bool) $data['trashed']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - if ($object->isInitialized('trashed') && null !== $object->getTrashed()) { - $data['trashed'] = $object->getTrashed(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TrashStructureApplicationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class === $type; + if (\array_key_exists('trashed', $data)) { + $object->setTrashed($data['trashed']); + unset($data['trashed']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TrashStructureApplication(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('trashed', $data)) { - $object->setTrashed($data['trashed']); - unset($data['trashed']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('trashed') && null !== $data->getTrashed()) { + $dataArray['trashed'] = $data->getTrashed(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - if ($object->isInitialized('trashed') && null !== $object->getTrashed()) { - $data['trashed'] = $object->getTrashed(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class => false]; } } diff --git a/generated/Normalizer/TrashStructureGroupNormalizer.php b/generated/Normalizer/TrashStructureGroupNormalizer.php index 3e1c35c..1022f58 100644 --- a/generated/Normalizer/TrashStructureGroupNormalizer.php +++ b/generated/Normalizer/TrashStructureGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,89 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TrashStructureGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TrashStructureGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TrashStructureGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('trashed', $data)) { - $object->setTrashed($data['trashed']); - unset($data['trashed']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('applications', $data)) { - $values = []; - foreach ($data['applications'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class, 'json', $context); - } - $object->setApplications($values); - unset($data['applications']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TrashStructureGroup(); + if (\array_key_exists('trashed', $data) && \is_int($data['trashed'])) { + $data['trashed'] = (bool) $data['trashed']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['trashed'] = $object->getTrashed(); - $data['name'] = $object->getName(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('trashed', $data)) { + $object->setTrashed($data['trashed']); + unset($data['trashed']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('applications', $data)) { $values = []; - foreach ($object->getApplications() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['applications'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class, 'json', $context); } - $data['applications'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setApplications($values); + unset($data['applications']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => false]; - } + return $object; } -} else { - class TrashStructureGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['trashed'] = $data->getTrashed(); + $dataArray['name'] = $data->getName(); + $values = []; + foreach ($data->getApplications() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TrashStructureGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('trashed', $data)) { - $object->setTrashed($data['trashed']); - unset($data['trashed']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('applications', $data)) { - $values = []; - foreach ($data['applications'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashStructureApplication::class, 'json', $context); - } - $object->setApplications($values); - unset($data['applications']); + $dataArray['applications'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['trashed'] = $object->getTrashed(); - $data['name'] = $object->getName(); - $values = []; - foreach ($object->getApplications() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['applications'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class => false]; } } diff --git a/generated/Normalizer/TrashStructureNormalizer.php b/generated/Normalizer/TrashStructureNormalizer.php index d0d4811..647d1a2 100644 --- a/generated/Normalizer/TrashStructureNormalizer.php +++ b/generated/Normalizer/TrashStructureNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,171 +20,84 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TrashStructureNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TrashStructureNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TrashStructure::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TrashStructure::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructure::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructure::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TrashStructure(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('groups', $data)) { - $values = []; - foreach ($data['groups'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class, 'json', $context); - } - $object->setGroups($values); - unset($data['groups']); - } - if (\array_key_exists('workspaces', $data)) { - $values_1 = []; - foreach ($data['workspaces'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class, 'json', $context); - } - $object->setWorkspaces($values_1); - unset($data['workspaces']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TrashStructure(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('groups', $data)) { $values = []; - foreach ($object->getGroups() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['groups'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class, 'json', $context); } - $data['groups'] = $values; + $object->setGroups($values); + unset($data['groups']); + } + if (\array_key_exists('workspaces', $data)) { $values_1 = []; - foreach ($object->getWorkspaces() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['workspaces'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class, 'json', $context); } - $data['workspaces'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setWorkspaces($values_1); + unset($data['workspaces']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TrashStructure::class => false]; - } + return $object; } -} else { - class TrashStructureNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TrashStructure::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getGroups() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TrashStructure::class === get_class($data); + $dataArray['groups'] = $values; + $values_1 = []; + foreach ($data->getWorkspaces() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TrashStructure(); - if (null === $data || false === \is_array($data)) { - return $object; + $dataArray['workspaces'] = $values_1; + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - if (\array_key_exists('groups', $data)) { - $values = []; - foreach ($data['groups'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class, 'json', $context); - } - $object->setGroups($values); - unset($data['groups']); - } - if (\array_key_exists('workspaces', $data)) { - $values_1 = []; - foreach ($data['workspaces'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\TrashStructureGroup::class, 'json', $context); - } - $object->setWorkspaces($values_1); - unset($data['workspaces']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getGroups() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['groups'] = $values; - $values_1 = []; - foreach ($object->getWorkspaces() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['workspaces'] = $values_1; - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TrashStructure::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TrashStructure::class => false]; } } diff --git a/generated/Normalizer/TypeFormulaRequestNormalizer.php b/generated/Normalizer/TypeFormulaRequestNormalizer.php index cc4e16c..2248d03 100644 --- a/generated/Normalizer/TypeFormulaRequestNormalizer.php +++ b/generated/Normalizer/TypeFormulaRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,139 +20,68 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TypeFormulaRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TypeFormulaRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['formula'] = $object->getFormula(); - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('formula', $data)) { + $object->setFormula($data['formula']); + unset($data['formula']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class TypeFormulaRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypeFormulaRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['formula'] = $data->getFormula(); + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['formula'] = $object->getFormula(); - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TypeFormulaRequest::class => false]; } } diff --git a/generated/Normalizer/TypeFormulaResultNormalizer.php b/generated/Normalizer/TypeFormulaResultNormalizer.php index a358e94..b14994b 100644 --- a/generated/Normalizer/TypeFormulaResultNormalizer.php +++ b/generated/Normalizer/TypeFormulaResultNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,315 +20,165 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TypeFormulaResultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TypeFormulaResultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypeFormulaResult(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TypeFormulaResult(); + if (\array_key_exists('date_include_time', $data) && \is_int($data['date_include_time'])) { + $data['date_include_time'] = (bool) $data['date_include_time']; + } + if (\array_key_exists('date_show_tzinfo', $data) && \is_int($data['date_show_tzinfo'])) { + $data['date_show_tzinfo'] = (bool) $data['date_show_tzinfo']; + } + if (\array_key_exists('nullable', $data) && \is_int($data['nullable'])) { + $data['nullable'] = (bool) $data['nullable']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - $data['nullable'] = $object->getNullable(); - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { + $object->setDateFormat($data['date_format']); + unset($data['date_format']); + } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { + $object->setDateFormat(null); + } + if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { + $object->setDateIncludeTime($data['date_include_time']); + unset($data['date_include_time']); + } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { + $object->setDateIncludeTime(null); + } + if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { + $object->setDateShowTzinfo($data['date_show_tzinfo']); + unset($data['date_show_tzinfo']); + } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { + $object->setDateShowTzinfo(null); + } + if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { + $object->setArrayFormulaType($data['array_formula_type']); + unset($data['array_formula_type']); + } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { + $object->setArrayFormulaType(null); + } + if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { + $object->setDateTimeFormat($data['date_time_format']); + unset($data['date_time_format']); + } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { + $object->setDateTimeFormat(null); + } + if (\array_key_exists('nullable', $data)) { + $object->setNullable($data['nullable']); + unset($data['nullable']); + } + if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { + $object->setDateForceTimezone($data['date_force_timezone']); + unset($data['date_force_timezone']); + } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { + $object->setDateForceTimezone(null); + } + if (\array_key_exists('error', $data) && null !== $data['error']) { + $object->setError($data['error']); + unset($data['error']); + } elseif (\array_key_exists('error', $data) && null === $data['error']) { + $object->setError(null); + } + if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { + $object->setNumberDecimalPlaces($data['number_decimal_places']); + unset($data['number_decimal_places']); + } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { + $object->setNumberDecimalPlaces(null); + } + if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { + $object->setDurationFormat($data['duration_format']); + unset($data['duration_format']); + } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { + $object->setDurationFormat(null); + } + if (\array_key_exists('formula', $data)) { + $object->setFormula($data['formula']); + unset($data['formula']); + } + if (\array_key_exists('formula_type', $data)) { + $object->setFormulaType($data['formula_type']); + unset($data['formula_type']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => false]; - } + return $object; } -} else { - class TypeFormulaResultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('dateFormat') && null !== $data->getDateFormat()) { + $dataArray['date_format'] = $data->getDateFormat(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class === get_class($data); + if ($data->isInitialized('dateIncludeTime') && null !== $data->getDateIncludeTime()) { + $dataArray['date_include_time'] = $data->getDateIncludeTime(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypeFormulaResult(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('date_format', $data) && null !== $data['date_format']) { - $object->setDateFormat($data['date_format']); - unset($data['date_format']); - } elseif (\array_key_exists('date_format', $data) && null === $data['date_format']) { - $object->setDateFormat(null); - } - if (\array_key_exists('date_include_time', $data) && null !== $data['date_include_time']) { - $object->setDateIncludeTime($data['date_include_time']); - unset($data['date_include_time']); - } elseif (\array_key_exists('date_include_time', $data) && null === $data['date_include_time']) { - $object->setDateIncludeTime(null); - } - if (\array_key_exists('date_show_tzinfo', $data) && null !== $data['date_show_tzinfo']) { - $object->setDateShowTzinfo($data['date_show_tzinfo']); - unset($data['date_show_tzinfo']); - } elseif (\array_key_exists('date_show_tzinfo', $data) && null === $data['date_show_tzinfo']) { - $object->setDateShowTzinfo(null); - } - if (\array_key_exists('array_formula_type', $data) && null !== $data['array_formula_type']) { - $object->setArrayFormulaType($data['array_formula_type']); - unset($data['array_formula_type']); - } elseif (\array_key_exists('array_formula_type', $data) && null === $data['array_formula_type']) { - $object->setArrayFormulaType(null); - } - if (\array_key_exists('date_time_format', $data) && null !== $data['date_time_format']) { - $object->setDateTimeFormat($data['date_time_format']); - unset($data['date_time_format']); - } elseif (\array_key_exists('date_time_format', $data) && null === $data['date_time_format']) { - $object->setDateTimeFormat(null); - } - if (\array_key_exists('nullable', $data)) { - $object->setNullable($data['nullable']); - unset($data['nullable']); - } - if (\array_key_exists('date_force_timezone', $data) && null !== $data['date_force_timezone']) { - $object->setDateForceTimezone($data['date_force_timezone']); - unset($data['date_force_timezone']); - } elseif (\array_key_exists('date_force_timezone', $data) && null === $data['date_force_timezone']) { - $object->setDateForceTimezone(null); - } - if (\array_key_exists('error', $data) && null !== $data['error']) { - $object->setError($data['error']); - unset($data['error']); - } elseif (\array_key_exists('error', $data) && null === $data['error']) { - $object->setError(null); - } - if (\array_key_exists('number_decimal_places', $data) && null !== $data['number_decimal_places']) { - $object->setNumberDecimalPlaces($data['number_decimal_places']); - unset($data['number_decimal_places']); - } elseif (\array_key_exists('number_decimal_places', $data) && null === $data['number_decimal_places']) { - $object->setNumberDecimalPlaces(null); - } - if (\array_key_exists('duration_format', $data) && null !== $data['duration_format']) { - $object->setDurationFormat($data['duration_format']); - unset($data['duration_format']); - } elseif (\array_key_exists('duration_format', $data) && null === $data['duration_format']) { - $object->setDurationFormat(null); - } - if (\array_key_exists('formula', $data)) { - $object->setFormula($data['formula']); - unset($data['formula']); - } - if (\array_key_exists('formula_type', $data)) { - $object->setFormulaType($data['formula_type']); - unset($data['formula_type']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('dateShowTzinfo') && null !== $data->getDateShowTzinfo()) { + $dataArray['date_show_tzinfo'] = $data->getDateShowTzinfo(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('dateFormat') && null !== $object->getDateFormat()) { - $data['date_format'] = $object->getDateFormat(); - } - if ($object->isInitialized('dateIncludeTime') && null !== $object->getDateIncludeTime()) { - $data['date_include_time'] = $object->getDateIncludeTime(); - } - if ($object->isInitialized('dateShowTzinfo') && null !== $object->getDateShowTzinfo()) { - $data['date_show_tzinfo'] = $object->getDateShowTzinfo(); - } - if ($object->isInitialized('arrayFormulaType') && null !== $object->getArrayFormulaType()) { - $data['array_formula_type'] = $object->getArrayFormulaType(); - } - if ($object->isInitialized('dateTimeFormat') && null !== $object->getDateTimeFormat()) { - $data['date_time_format'] = $object->getDateTimeFormat(); - } - $data['nullable'] = $object->getNullable(); - if ($object->isInitialized('dateForceTimezone') && null !== $object->getDateForceTimezone()) { - $data['date_force_timezone'] = $object->getDateForceTimezone(); - } - if ($object->isInitialized('error') && null !== $object->getError()) { - $data['error'] = $object->getError(); - } - if ($object->isInitialized('numberDecimalPlaces') && null !== $object->getNumberDecimalPlaces()) { - $data['number_decimal_places'] = $object->getNumberDecimalPlaces(); - } - if ($object->isInitialized('durationFormat') && null !== $object->getDurationFormat()) { - $data['duration_format'] = $object->getDurationFormat(); - } - $data['formula'] = $object->getFormula(); - if ($object->isInitialized('formulaType') && null !== $object->getFormulaType()) { - $data['formula_type'] = $object->getFormulaType(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('arrayFormulaType') && null !== $data->getArrayFormulaType()) { + $dataArray['array_formula_type'] = $data->getArrayFormulaType(); + } + if ($data->isInitialized('dateTimeFormat') && null !== $data->getDateTimeFormat()) { + $dataArray['date_time_format'] = $data->getDateTimeFormat(); + } + $dataArray['nullable'] = $data->getNullable(); + if ($data->isInitialized('dateForceTimezone') && null !== $data->getDateForceTimezone()) { + $dataArray['date_force_timezone'] = $data->getDateForceTimezone(); + } + if ($data->isInitialized('error') && null !== $data->getError()) { + $dataArray['error'] = $data->getError(); + } + if ($data->isInitialized('numberDecimalPlaces') && null !== $data->getNumberDecimalPlaces()) { + $dataArray['number_decimal_places'] = $data->getNumberDecimalPlaces(); + } + if ($data->isInitialized('durationFormat') && null !== $data->getDurationFormat()) { + $dataArray['duration_format'] = $data->getDurationFormat(); + } + $dataArray['formula'] = $data->getFormula(); + if ($data->isInitialized('formulaType') && null !== $data->getFormulaType()) { + $dataArray['formula_type'] = $data->getFormulaType(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TypeFormulaResult::class => false]; } } diff --git a/generated/Normalizer/TypographyConfigBlockNormalizer.php b/generated/Normalizer/TypographyConfigBlockNormalizer.php index 2c7d306..33e0d9a 100644 --- a/generated/Normalizer/TypographyConfigBlockNormalizer.php +++ b/generated/Normalizer/TypographyConfigBlockNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,133 +20,65 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TypographyConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TypographyConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('typography', $data)) { - $object->setTypography($this->denormalizer->denormalize($data['typography'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class, 'json', $context)); - unset($data['typography']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('typography') && null !== $object->getTypography()) { - $data['typography'] = $this->normalizer->normalize($object->getTypography(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('typography', $data)) { + $object->setTypography($this->denormalizer->denormalize($data['typography'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class, 'json', $context)); + unset($data['typography']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => false]; - } + return $object; } -} else { - class TypographyConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('typography') && null !== $data->getTypography()) { + $dataArray['typography'] = $this->normalizer->normalize($data->getTypography(), 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypographyConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('typography', $data)) { - $object->setTypography($this->denormalizer->denormalize($data['typography'], \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class, 'json', $context)); - unset($data['typography']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('typography') && null !== $object->getTypography()) { - $data['typography'] = $this->normalizer->normalize($object->getTypography(), 'json', $context); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TypographyConfigBlock::class => false]; } } diff --git a/generated/Normalizer/TypographyConfigBlockTypographyNormalizer.php b/generated/Normalizer/TypographyConfigBlockTypographyNormalizer.php index ed5d20a..444c7c8 100644 --- a/generated/Normalizer/TypographyConfigBlockTypographyNormalizer.php +++ b/generated/Normalizer/TypographyConfigBlockTypographyNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,511 +20,254 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TypographyConfigBlockTypographyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TypographyConfigBlockTypographyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('body_font_family', $data)) { + $object->setBodyFontFamily($data['body_font_family']); + unset($data['body_font_family']); + } + if (\array_key_exists('body_font_size', $data)) { + $object->setBodyFontSize($data['body_font_size']); + unset($data['body_font_size']); + } + if (\array_key_exists('body_text_color', $data)) { + $object->setBodyTextColor($data['body_text_color']); + unset($data['body_text_color']); + } + if (\array_key_exists('body_text_alignment', $data)) { + $object->setBodyTextAlignment($data['body_text_alignment']); + unset($data['body_text_alignment']); + } + if (\array_key_exists('heading_1_font_family', $data)) { + $object->setHeading1FontFamily($data['heading_1_font_family']); + unset($data['heading_1_font_family']); + } + if (\array_key_exists('heading_1_font_size', $data)) { + $object->setHeading1FontSize($data['heading_1_font_size']); + unset($data['heading_1_font_size']); + } + if (\array_key_exists('heading_1_text_color', $data)) { + $object->setHeading1TextColor($data['heading_1_text_color']); + unset($data['heading_1_text_color']); + } + if (\array_key_exists('heading_1_text_alignment', $data)) { + $object->setHeading1TextAlignment($data['heading_1_text_alignment']); + unset($data['heading_1_text_alignment']); + } + if (\array_key_exists('heading_2_font_family', $data)) { + $object->setHeading2FontFamily($data['heading_2_font_family']); + unset($data['heading_2_font_family']); + } + if (\array_key_exists('heading_2_font_size', $data)) { + $object->setHeading2FontSize($data['heading_2_font_size']); + unset($data['heading_2_font_size']); + } + if (\array_key_exists('heading_2_text_color', $data)) { + $object->setHeading2TextColor($data['heading_2_text_color']); + unset($data['heading_2_text_color']); + } + if (\array_key_exists('heading_2_text_alignment', $data)) { + $object->setHeading2TextAlignment($data['heading_2_text_alignment']); + unset($data['heading_2_text_alignment']); + } + if (\array_key_exists('heading_3_font_family', $data)) { + $object->setHeading3FontFamily($data['heading_3_font_family']); + unset($data['heading_3_font_family']); + } + if (\array_key_exists('heading_3_font_size', $data)) { + $object->setHeading3FontSize($data['heading_3_font_size']); + unset($data['heading_3_font_size']); + } + if (\array_key_exists('heading_3_text_color', $data)) { + $object->setHeading3TextColor($data['heading_3_text_color']); + unset($data['heading_3_text_color']); + } + if (\array_key_exists('heading_3_text_alignment', $data)) { + $object->setHeading3TextAlignment($data['heading_3_text_alignment']); + unset($data['heading_3_text_alignment']); + } + if (\array_key_exists('heading_4_font_family', $data)) { + $object->setHeading4FontFamily($data['heading_4_font_family']); + unset($data['heading_4_font_family']); + } + if (\array_key_exists('heading_4_font_size', $data)) { + $object->setHeading4FontSize($data['heading_4_font_size']); + unset($data['heading_4_font_size']); + } + if (\array_key_exists('heading_4_text_color', $data)) { + $object->setHeading4TextColor($data['heading_4_text_color']); + unset($data['heading_4_text_color']); + } + if (\array_key_exists('heading_4_text_alignment', $data)) { + $object->setHeading4TextAlignment($data['heading_4_text_alignment']); + unset($data['heading_4_text_alignment']); + } + if (\array_key_exists('heading_5_font_family', $data)) { + $object->setHeading5FontFamily($data['heading_5_font_family']); + unset($data['heading_5_font_family']); + } + if (\array_key_exists('heading_5_font_size', $data)) { + $object->setHeading5FontSize($data['heading_5_font_size']); + unset($data['heading_5_font_size']); + } + if (\array_key_exists('heading_5_text_color', $data)) { + $object->setHeading5TextColor($data['heading_5_text_color']); + unset($data['heading_5_text_color']); + } + if (\array_key_exists('heading_5_text_alignment', $data)) { + $object->setHeading5TextAlignment($data['heading_5_text_alignment']); + unset($data['heading_5_text_alignment']); + } + if (\array_key_exists('heading_6_font_family', $data)) { + $object->setHeading6FontFamily($data['heading_6_font_family']); + unset($data['heading_6_font_family']); + } + if (\array_key_exists('heading_6_font_size', $data)) { + $object->setHeading6FontSize($data['heading_6_font_size']); + unset($data['heading_6_font_size']); + } + if (\array_key_exists('heading_6_text_color', $data)) { + $object->setHeading6TextColor($data['heading_6_text_color']); + unset($data['heading_6_text_color']); + } + if (\array_key_exists('heading_6_text_alignment', $data)) { + $object->setHeading6TextAlignment($data['heading_6_text_alignment']); + unset($data['heading_6_text_alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => false]; - } + return $object; } -} else { - class TypographyConfigBlockTypographyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('bodyFontFamily') && null !== $data->getBodyFontFamily()) { + $dataArray['body_font_family'] = $data->getBodyFontFamily(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class === get_class($data); + if ($data->isInitialized('bodyFontSize') && null !== $data->getBodyFontSize()) { + $dataArray['body_font_size'] = $data->getBodyFontSize(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('bodyTextColor') && null !== $data->getBodyTextColor()) { + $dataArray['body_text_color'] = $data->getBodyTextColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('bodyTextAlignment') && null !== $data->getBodyTextAlignment()) { + $dataArray['body_text_alignment'] = $data->getBodyTextAlignment(); + } + if ($data->isInitialized('heading1FontFamily') && null !== $data->getHeading1FontFamily()) { + $dataArray['heading_1_font_family'] = $data->getHeading1FontFamily(); + } + if ($data->isInitialized('heading1FontSize') && null !== $data->getHeading1FontSize()) { + $dataArray['heading_1_font_size'] = $data->getHeading1FontSize(); + } + if ($data->isInitialized('heading1TextColor') && null !== $data->getHeading1TextColor()) { + $dataArray['heading_1_text_color'] = $data->getHeading1TextColor(); + } + if ($data->isInitialized('heading1TextAlignment') && null !== $data->getHeading1TextAlignment()) { + $dataArray['heading_1_text_alignment'] = $data->getHeading1TextAlignment(); + } + if ($data->isInitialized('heading2FontFamily') && null !== $data->getHeading2FontFamily()) { + $dataArray['heading_2_font_family'] = $data->getHeading2FontFamily(); + } + if ($data->isInitialized('heading2FontSize') && null !== $data->getHeading2FontSize()) { + $dataArray['heading_2_font_size'] = $data->getHeading2FontSize(); + } + if ($data->isInitialized('heading2TextColor') && null !== $data->getHeading2TextColor()) { + $dataArray['heading_2_text_color'] = $data->getHeading2TextColor(); + } + if ($data->isInitialized('heading2TextAlignment') && null !== $data->getHeading2TextAlignment()) { + $dataArray['heading_2_text_alignment'] = $data->getHeading2TextAlignment(); + } + if ($data->isInitialized('heading3FontFamily') && null !== $data->getHeading3FontFamily()) { + $dataArray['heading_3_font_family'] = $data->getHeading3FontFamily(); + } + if ($data->isInitialized('heading3FontSize') && null !== $data->getHeading3FontSize()) { + $dataArray['heading_3_font_size'] = $data->getHeading3FontSize(); + } + if ($data->isInitialized('heading3TextColor') && null !== $data->getHeading3TextColor()) { + $dataArray['heading_3_text_color'] = $data->getHeading3TextColor(); + } + if ($data->isInitialized('heading3TextAlignment') && null !== $data->getHeading3TextAlignment()) { + $dataArray['heading_3_text_alignment'] = $data->getHeading3TextAlignment(); + } + if ($data->isInitialized('heading4FontFamily') && null !== $data->getHeading4FontFamily()) { + $dataArray['heading_4_font_family'] = $data->getHeading4FontFamily(); + } + if ($data->isInitialized('heading4FontSize') && null !== $data->getHeading4FontSize()) { + $dataArray['heading_4_font_size'] = $data->getHeading4FontSize(); + } + if ($data->isInitialized('heading4TextColor') && null !== $data->getHeading4TextColor()) { + $dataArray['heading_4_text_color'] = $data->getHeading4TextColor(); + } + if ($data->isInitialized('heading4TextAlignment') && null !== $data->getHeading4TextAlignment()) { + $dataArray['heading_4_text_alignment'] = $data->getHeading4TextAlignment(); + } + if ($data->isInitialized('heading5FontFamily') && null !== $data->getHeading5FontFamily()) { + $dataArray['heading_5_font_family'] = $data->getHeading5FontFamily(); + } + if ($data->isInitialized('heading5FontSize') && null !== $data->getHeading5FontSize()) { + $dataArray['heading_5_font_size'] = $data->getHeading5FontSize(); + } + if ($data->isInitialized('heading5TextColor') && null !== $data->getHeading5TextColor()) { + $dataArray['heading_5_text_color'] = $data->getHeading5TextColor(); + } + if ($data->isInitialized('heading5TextAlignment') && null !== $data->getHeading5TextAlignment()) { + $dataArray['heading_5_text_alignment'] = $data->getHeading5TextAlignment(); + } + if ($data->isInitialized('heading6FontFamily') && null !== $data->getHeading6FontFamily()) { + $dataArray['heading_6_font_family'] = $data->getHeading6FontFamily(); + } + if ($data->isInitialized('heading6FontSize') && null !== $data->getHeading6FontSize()) { + $dataArray['heading_6_font_size'] = $data->getHeading6FontSize(); + } + if ($data->isInitialized('heading6TextColor') && null !== $data->getHeading6TextColor()) { + $dataArray['heading_6_text_color'] = $data->getHeading6TextColor(); + } + if ($data->isInitialized('heading6TextAlignment') && null !== $data->getHeading6TextAlignment()) { + $dataArray['heading_6_text_alignment'] = $data->getHeading6TextAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TypographyConfigBlockTypography::class => false]; } } diff --git a/generated/Normalizer/TypographyThemeConfigBlockNormalizer.php b/generated/Normalizer/TypographyThemeConfigBlockNormalizer.php index 321b7aa..0fc02a3 100644 --- a/generated/Normalizer/TypographyThemeConfigBlockNormalizer.php +++ b/generated/Normalizer/TypographyThemeConfigBlockNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,511 +20,254 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TypographyThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class TypographyThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('body_font_family', $data)) { + $object->setBodyFontFamily($data['body_font_family']); + unset($data['body_font_family']); + } + if (\array_key_exists('body_font_size', $data)) { + $object->setBodyFontSize($data['body_font_size']); + unset($data['body_font_size']); + } + if (\array_key_exists('body_text_color', $data)) { + $object->setBodyTextColor($data['body_text_color']); + unset($data['body_text_color']); + } + if (\array_key_exists('body_text_alignment', $data)) { + $object->setBodyTextAlignment($data['body_text_alignment']); + unset($data['body_text_alignment']); + } + if (\array_key_exists('heading_1_font_family', $data)) { + $object->setHeading1FontFamily($data['heading_1_font_family']); + unset($data['heading_1_font_family']); + } + if (\array_key_exists('heading_1_font_size', $data)) { + $object->setHeading1FontSize($data['heading_1_font_size']); + unset($data['heading_1_font_size']); + } + if (\array_key_exists('heading_1_text_color', $data)) { + $object->setHeading1TextColor($data['heading_1_text_color']); + unset($data['heading_1_text_color']); + } + if (\array_key_exists('heading_1_text_alignment', $data)) { + $object->setHeading1TextAlignment($data['heading_1_text_alignment']); + unset($data['heading_1_text_alignment']); + } + if (\array_key_exists('heading_2_font_family', $data)) { + $object->setHeading2FontFamily($data['heading_2_font_family']); + unset($data['heading_2_font_family']); + } + if (\array_key_exists('heading_2_font_size', $data)) { + $object->setHeading2FontSize($data['heading_2_font_size']); + unset($data['heading_2_font_size']); + } + if (\array_key_exists('heading_2_text_color', $data)) { + $object->setHeading2TextColor($data['heading_2_text_color']); + unset($data['heading_2_text_color']); + } + if (\array_key_exists('heading_2_text_alignment', $data)) { + $object->setHeading2TextAlignment($data['heading_2_text_alignment']); + unset($data['heading_2_text_alignment']); + } + if (\array_key_exists('heading_3_font_family', $data)) { + $object->setHeading3FontFamily($data['heading_3_font_family']); + unset($data['heading_3_font_family']); + } + if (\array_key_exists('heading_3_font_size', $data)) { + $object->setHeading3FontSize($data['heading_3_font_size']); + unset($data['heading_3_font_size']); + } + if (\array_key_exists('heading_3_text_color', $data)) { + $object->setHeading3TextColor($data['heading_3_text_color']); + unset($data['heading_3_text_color']); + } + if (\array_key_exists('heading_3_text_alignment', $data)) { + $object->setHeading3TextAlignment($data['heading_3_text_alignment']); + unset($data['heading_3_text_alignment']); + } + if (\array_key_exists('heading_4_font_family', $data)) { + $object->setHeading4FontFamily($data['heading_4_font_family']); + unset($data['heading_4_font_family']); + } + if (\array_key_exists('heading_4_font_size', $data)) { + $object->setHeading4FontSize($data['heading_4_font_size']); + unset($data['heading_4_font_size']); + } + if (\array_key_exists('heading_4_text_color', $data)) { + $object->setHeading4TextColor($data['heading_4_text_color']); + unset($data['heading_4_text_color']); + } + if (\array_key_exists('heading_4_text_alignment', $data)) { + $object->setHeading4TextAlignment($data['heading_4_text_alignment']); + unset($data['heading_4_text_alignment']); + } + if (\array_key_exists('heading_5_font_family', $data)) { + $object->setHeading5FontFamily($data['heading_5_font_family']); + unset($data['heading_5_font_family']); + } + if (\array_key_exists('heading_5_font_size', $data)) { + $object->setHeading5FontSize($data['heading_5_font_size']); + unset($data['heading_5_font_size']); + } + if (\array_key_exists('heading_5_text_color', $data)) { + $object->setHeading5TextColor($data['heading_5_text_color']); + unset($data['heading_5_text_color']); + } + if (\array_key_exists('heading_5_text_alignment', $data)) { + $object->setHeading5TextAlignment($data['heading_5_text_alignment']); + unset($data['heading_5_text_alignment']); + } + if (\array_key_exists('heading_6_font_family', $data)) { + $object->setHeading6FontFamily($data['heading_6_font_family']); + unset($data['heading_6_font_family']); + } + if (\array_key_exists('heading_6_font_size', $data)) { + $object->setHeading6FontSize($data['heading_6_font_size']); + unset($data['heading_6_font_size']); + } + if (\array_key_exists('heading_6_text_color', $data)) { + $object->setHeading6TextColor($data['heading_6_text_color']); + unset($data['heading_6_text_color']); + } + if (\array_key_exists('heading_6_text_alignment', $data)) { + $object->setHeading6TextAlignment($data['heading_6_text_alignment']); + unset($data['heading_6_text_alignment']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => false]; - } + return $object; } -} else { - class TypographyThemeConfigBlockNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('bodyFontFamily') && null !== $data->getBodyFontFamily()) { + $dataArray['body_font_family'] = $data->getBodyFontFamily(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class === get_class($data); + if ($data->isInitialized('bodyFontSize') && null !== $data->getBodyFontSize()) { + $dataArray['body_font_size'] = $data->getBodyFontSize(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('body_font_family', $data)) { - $object->setBodyFontFamily($data['body_font_family']); - unset($data['body_font_family']); - } - if (\array_key_exists('body_font_size', $data)) { - $object->setBodyFontSize($data['body_font_size']); - unset($data['body_font_size']); - } - if (\array_key_exists('body_text_color', $data)) { - $object->setBodyTextColor($data['body_text_color']); - unset($data['body_text_color']); - } - if (\array_key_exists('body_text_alignment', $data)) { - $object->setBodyTextAlignment($data['body_text_alignment']); - unset($data['body_text_alignment']); - } - if (\array_key_exists('heading_1_font_family', $data)) { - $object->setHeading1FontFamily($data['heading_1_font_family']); - unset($data['heading_1_font_family']); - } - if (\array_key_exists('heading_1_font_size', $data)) { - $object->setHeading1FontSize($data['heading_1_font_size']); - unset($data['heading_1_font_size']); - } - if (\array_key_exists('heading_1_text_color', $data)) { - $object->setHeading1TextColor($data['heading_1_text_color']); - unset($data['heading_1_text_color']); - } - if (\array_key_exists('heading_1_text_alignment', $data)) { - $object->setHeading1TextAlignment($data['heading_1_text_alignment']); - unset($data['heading_1_text_alignment']); - } - if (\array_key_exists('heading_2_font_family', $data)) { - $object->setHeading2FontFamily($data['heading_2_font_family']); - unset($data['heading_2_font_family']); - } - if (\array_key_exists('heading_2_font_size', $data)) { - $object->setHeading2FontSize($data['heading_2_font_size']); - unset($data['heading_2_font_size']); - } - if (\array_key_exists('heading_2_text_color', $data)) { - $object->setHeading2TextColor($data['heading_2_text_color']); - unset($data['heading_2_text_color']); - } - if (\array_key_exists('heading_2_text_alignment', $data)) { - $object->setHeading2TextAlignment($data['heading_2_text_alignment']); - unset($data['heading_2_text_alignment']); - } - if (\array_key_exists('heading_3_font_family', $data)) { - $object->setHeading3FontFamily($data['heading_3_font_family']); - unset($data['heading_3_font_family']); - } - if (\array_key_exists('heading_3_font_size', $data)) { - $object->setHeading3FontSize($data['heading_3_font_size']); - unset($data['heading_3_font_size']); - } - if (\array_key_exists('heading_3_text_color', $data)) { - $object->setHeading3TextColor($data['heading_3_text_color']); - unset($data['heading_3_text_color']); - } - if (\array_key_exists('heading_3_text_alignment', $data)) { - $object->setHeading3TextAlignment($data['heading_3_text_alignment']); - unset($data['heading_3_text_alignment']); - } - if (\array_key_exists('heading_4_font_family', $data)) { - $object->setHeading4FontFamily($data['heading_4_font_family']); - unset($data['heading_4_font_family']); - } - if (\array_key_exists('heading_4_font_size', $data)) { - $object->setHeading4FontSize($data['heading_4_font_size']); - unset($data['heading_4_font_size']); - } - if (\array_key_exists('heading_4_text_color', $data)) { - $object->setHeading4TextColor($data['heading_4_text_color']); - unset($data['heading_4_text_color']); - } - if (\array_key_exists('heading_4_text_alignment', $data)) { - $object->setHeading4TextAlignment($data['heading_4_text_alignment']); - unset($data['heading_4_text_alignment']); - } - if (\array_key_exists('heading_5_font_family', $data)) { - $object->setHeading5FontFamily($data['heading_5_font_family']); - unset($data['heading_5_font_family']); - } - if (\array_key_exists('heading_5_font_size', $data)) { - $object->setHeading5FontSize($data['heading_5_font_size']); - unset($data['heading_5_font_size']); - } - if (\array_key_exists('heading_5_text_color', $data)) { - $object->setHeading5TextColor($data['heading_5_text_color']); - unset($data['heading_5_text_color']); - } - if (\array_key_exists('heading_5_text_alignment', $data)) { - $object->setHeading5TextAlignment($data['heading_5_text_alignment']); - unset($data['heading_5_text_alignment']); - } - if (\array_key_exists('heading_6_font_family', $data)) { - $object->setHeading6FontFamily($data['heading_6_font_family']); - unset($data['heading_6_font_family']); - } - if (\array_key_exists('heading_6_font_size', $data)) { - $object->setHeading6FontSize($data['heading_6_font_size']); - unset($data['heading_6_font_size']); - } - if (\array_key_exists('heading_6_text_color', $data)) { - $object->setHeading6TextColor($data['heading_6_text_color']); - unset($data['heading_6_text_color']); - } - if (\array_key_exists('heading_6_text_alignment', $data)) { - $object->setHeading6TextAlignment($data['heading_6_text_alignment']); - unset($data['heading_6_text_alignment']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('bodyTextColor') && null !== $data->getBodyTextColor()) { + $dataArray['body_text_color'] = $data->getBodyTextColor(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('bodyFontFamily') && null !== $object->getBodyFontFamily()) { - $data['body_font_family'] = $object->getBodyFontFamily(); - } - if ($object->isInitialized('bodyFontSize') && null !== $object->getBodyFontSize()) { - $data['body_font_size'] = $object->getBodyFontSize(); - } - if ($object->isInitialized('bodyTextColor') && null !== $object->getBodyTextColor()) { - $data['body_text_color'] = $object->getBodyTextColor(); - } - if ($object->isInitialized('bodyTextAlignment') && null !== $object->getBodyTextAlignment()) { - $data['body_text_alignment'] = $object->getBodyTextAlignment(); - } - if ($object->isInitialized('heading1FontFamily') && null !== $object->getHeading1FontFamily()) { - $data['heading_1_font_family'] = $object->getHeading1FontFamily(); - } - if ($object->isInitialized('heading1FontSize') && null !== $object->getHeading1FontSize()) { - $data['heading_1_font_size'] = $object->getHeading1FontSize(); - } - if ($object->isInitialized('heading1TextColor') && null !== $object->getHeading1TextColor()) { - $data['heading_1_text_color'] = $object->getHeading1TextColor(); - } - if ($object->isInitialized('heading1TextAlignment') && null !== $object->getHeading1TextAlignment()) { - $data['heading_1_text_alignment'] = $object->getHeading1TextAlignment(); - } - if ($object->isInitialized('heading2FontFamily') && null !== $object->getHeading2FontFamily()) { - $data['heading_2_font_family'] = $object->getHeading2FontFamily(); - } - if ($object->isInitialized('heading2FontSize') && null !== $object->getHeading2FontSize()) { - $data['heading_2_font_size'] = $object->getHeading2FontSize(); - } - if ($object->isInitialized('heading2TextColor') && null !== $object->getHeading2TextColor()) { - $data['heading_2_text_color'] = $object->getHeading2TextColor(); - } - if ($object->isInitialized('heading2TextAlignment') && null !== $object->getHeading2TextAlignment()) { - $data['heading_2_text_alignment'] = $object->getHeading2TextAlignment(); - } - if ($object->isInitialized('heading3FontFamily') && null !== $object->getHeading3FontFamily()) { - $data['heading_3_font_family'] = $object->getHeading3FontFamily(); - } - if ($object->isInitialized('heading3FontSize') && null !== $object->getHeading3FontSize()) { - $data['heading_3_font_size'] = $object->getHeading3FontSize(); - } - if ($object->isInitialized('heading3TextColor') && null !== $object->getHeading3TextColor()) { - $data['heading_3_text_color'] = $object->getHeading3TextColor(); - } - if ($object->isInitialized('heading3TextAlignment') && null !== $object->getHeading3TextAlignment()) { - $data['heading_3_text_alignment'] = $object->getHeading3TextAlignment(); - } - if ($object->isInitialized('heading4FontFamily') && null !== $object->getHeading4FontFamily()) { - $data['heading_4_font_family'] = $object->getHeading4FontFamily(); - } - if ($object->isInitialized('heading4FontSize') && null !== $object->getHeading4FontSize()) { - $data['heading_4_font_size'] = $object->getHeading4FontSize(); - } - if ($object->isInitialized('heading4TextColor') && null !== $object->getHeading4TextColor()) { - $data['heading_4_text_color'] = $object->getHeading4TextColor(); - } - if ($object->isInitialized('heading4TextAlignment') && null !== $object->getHeading4TextAlignment()) { - $data['heading_4_text_alignment'] = $object->getHeading4TextAlignment(); - } - if ($object->isInitialized('heading5FontFamily') && null !== $object->getHeading5FontFamily()) { - $data['heading_5_font_family'] = $object->getHeading5FontFamily(); - } - if ($object->isInitialized('heading5FontSize') && null !== $object->getHeading5FontSize()) { - $data['heading_5_font_size'] = $object->getHeading5FontSize(); - } - if ($object->isInitialized('heading5TextColor') && null !== $object->getHeading5TextColor()) { - $data['heading_5_text_color'] = $object->getHeading5TextColor(); - } - if ($object->isInitialized('heading5TextAlignment') && null !== $object->getHeading5TextAlignment()) { - $data['heading_5_text_alignment'] = $object->getHeading5TextAlignment(); - } - if ($object->isInitialized('heading6FontFamily') && null !== $object->getHeading6FontFamily()) { - $data['heading_6_font_family'] = $object->getHeading6FontFamily(); - } - if ($object->isInitialized('heading6FontSize') && null !== $object->getHeading6FontSize()) { - $data['heading_6_font_size'] = $object->getHeading6FontSize(); - } - if ($object->isInitialized('heading6TextColor') && null !== $object->getHeading6TextColor()) { - $data['heading_6_text_color'] = $object->getHeading6TextColor(); - } - if ($object->isInitialized('heading6TextAlignment') && null !== $object->getHeading6TextAlignment()) { - $data['heading_6_text_alignment'] = $object->getHeading6TextAlignment(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('bodyTextAlignment') && null !== $data->getBodyTextAlignment()) { + $dataArray['body_text_alignment'] = $data->getBodyTextAlignment(); + } + if ($data->isInitialized('heading1FontFamily') && null !== $data->getHeading1FontFamily()) { + $dataArray['heading_1_font_family'] = $data->getHeading1FontFamily(); + } + if ($data->isInitialized('heading1FontSize') && null !== $data->getHeading1FontSize()) { + $dataArray['heading_1_font_size'] = $data->getHeading1FontSize(); + } + if ($data->isInitialized('heading1TextColor') && null !== $data->getHeading1TextColor()) { + $dataArray['heading_1_text_color'] = $data->getHeading1TextColor(); + } + if ($data->isInitialized('heading1TextAlignment') && null !== $data->getHeading1TextAlignment()) { + $dataArray['heading_1_text_alignment'] = $data->getHeading1TextAlignment(); + } + if ($data->isInitialized('heading2FontFamily') && null !== $data->getHeading2FontFamily()) { + $dataArray['heading_2_font_family'] = $data->getHeading2FontFamily(); + } + if ($data->isInitialized('heading2FontSize') && null !== $data->getHeading2FontSize()) { + $dataArray['heading_2_font_size'] = $data->getHeading2FontSize(); + } + if ($data->isInitialized('heading2TextColor') && null !== $data->getHeading2TextColor()) { + $dataArray['heading_2_text_color'] = $data->getHeading2TextColor(); + } + if ($data->isInitialized('heading2TextAlignment') && null !== $data->getHeading2TextAlignment()) { + $dataArray['heading_2_text_alignment'] = $data->getHeading2TextAlignment(); + } + if ($data->isInitialized('heading3FontFamily') && null !== $data->getHeading3FontFamily()) { + $dataArray['heading_3_font_family'] = $data->getHeading3FontFamily(); + } + if ($data->isInitialized('heading3FontSize') && null !== $data->getHeading3FontSize()) { + $dataArray['heading_3_font_size'] = $data->getHeading3FontSize(); + } + if ($data->isInitialized('heading3TextColor') && null !== $data->getHeading3TextColor()) { + $dataArray['heading_3_text_color'] = $data->getHeading3TextColor(); + } + if ($data->isInitialized('heading3TextAlignment') && null !== $data->getHeading3TextAlignment()) { + $dataArray['heading_3_text_alignment'] = $data->getHeading3TextAlignment(); + } + if ($data->isInitialized('heading4FontFamily') && null !== $data->getHeading4FontFamily()) { + $dataArray['heading_4_font_family'] = $data->getHeading4FontFamily(); + } + if ($data->isInitialized('heading4FontSize') && null !== $data->getHeading4FontSize()) { + $dataArray['heading_4_font_size'] = $data->getHeading4FontSize(); + } + if ($data->isInitialized('heading4TextColor') && null !== $data->getHeading4TextColor()) { + $dataArray['heading_4_text_color'] = $data->getHeading4TextColor(); + } + if ($data->isInitialized('heading4TextAlignment') && null !== $data->getHeading4TextAlignment()) { + $dataArray['heading_4_text_alignment'] = $data->getHeading4TextAlignment(); + } + if ($data->isInitialized('heading5FontFamily') && null !== $data->getHeading5FontFamily()) { + $dataArray['heading_5_font_family'] = $data->getHeading5FontFamily(); + } + if ($data->isInitialized('heading5FontSize') && null !== $data->getHeading5FontSize()) { + $dataArray['heading_5_font_size'] = $data->getHeading5FontSize(); + } + if ($data->isInitialized('heading5TextColor') && null !== $data->getHeading5TextColor()) { + $dataArray['heading_5_text_color'] = $data->getHeading5TextColor(); + } + if ($data->isInitialized('heading5TextAlignment') && null !== $data->getHeading5TextAlignment()) { + $dataArray['heading_5_text_alignment'] = $data->getHeading5TextAlignment(); + } + if ($data->isInitialized('heading6FontFamily') && null !== $data->getHeading6FontFamily()) { + $dataArray['heading_6_font_family'] = $data->getHeading6FontFamily(); + } + if ($data->isInitialized('heading6FontSize') && null !== $data->getHeading6FontSize()) { + $dataArray['heading_6_font_size'] = $data->getHeading6FontSize(); + } + if ($data->isInitialized('heading6TextColor') && null !== $data->getHeading6TextColor()) { + $dataArray['heading_6_text_color'] = $data->getHeading6TextColor(); + } + if ($data->isInitialized('heading6TextAlignment') && null !== $data->getHeading6TextAlignment()) { + $dataArray['heading_6_text_alignment'] = $data->getHeading6TextAlignment(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\TypographyThemeConfigBlock::class => false]; } } diff --git a/generated/Normalizer/URLFieldCreateFieldNormalizer.php b/generated/Normalizer/URLFieldCreateFieldNormalizer.php index 07d1441..2d098ba 100644 --- a/generated/Normalizer/URLFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/URLFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class URLFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class URLFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\URLFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\URLFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class URLFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\URLFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\URLFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/URLFieldFieldNormalizer.php b/generated/Normalizer/URLFieldFieldNormalizer.php index 4ca4a7b..de83d22 100644 --- a/generated/Normalizer/URLFieldFieldNormalizer.php +++ b/generated/Normalizer/URLFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class URLFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class URLFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\URLFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\URLFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\URLFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\URLFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\URLFieldField::class => false]; - } + return $object; } -} else { - class URLFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\URLFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\URLFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\URLFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\URLFieldField::class => false]; } } diff --git a/generated/Normalizer/URLFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/URLFieldFieldSerializerWithRelatedFieldsNormalizer.php index 1da1721..cdb89c5 100644 --- a/generated/Normalizer/URLFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/URLFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class URLFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class URLFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class URLFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\URLFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/URLFieldUpdateFieldNormalizer.php b/generated/Normalizer/URLFieldUpdateFieldNormalizer.php index 6e35e90..a903d77 100644 --- a/generated/Normalizer/URLFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/URLFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class URLFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class URLFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => false]; - } + return $object; } -} else { - class URLFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\URLFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\URLFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/UUIDFieldCreateFieldNormalizer.php b/generated/Normalizer/UUIDFieldCreateFieldNormalizer.php index 142b719..707b37a 100644 --- a/generated/Normalizer/UUIDFieldCreateFieldNormalizer.php +++ b/generated/Normalizer/UUIDFieldCreateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,157 +20,77 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UUIDFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UUIDFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => false]; + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); } - } -} else { - class UUIDFieldCreateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class === $type; + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['type'] = $object->getType(); - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UUIDFieldCreateField::class => false]; } } diff --git a/generated/Normalizer/UUIDFieldFieldNormalizer.php b/generated/Normalizer/UUIDFieldFieldNormalizer.php index 312c5f9..0e0e16f 100644 --- a/generated/Normalizer/UUIDFieldFieldNormalizer.php +++ b/generated/Normalizer/UUIDFieldFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,106 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UUIDFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UUIDFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldField(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => false]; - } + return $object; } -} else { - class UUIDFieldFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldField::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UUIDFieldField::class => false]; } } diff --git a/generated/Normalizer/UUIDFieldFieldSerializerWithRelatedFieldsNormalizer.php b/generated/Normalizer/UUIDFieldFieldSerializerWithRelatedFieldsNormalizer.php index df3c138..5762a30 100644 --- a/generated/Normalizer/UUIDFieldFieldSerializerWithRelatedFieldsNormalizer.php +++ b/generated/Normalizer/UUIDFieldFieldSerializerWithRelatedFieldsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,219 +20,114 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UUIDFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UUIDFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields(); + if (\array_key_exists('primary', $data) && \is_int($data['primary'])) { + $data['primary'] = (bool) $data['primary']; + } + if (\array_key_exists('read_only', $data) && \is_int($data['read_only'])) { + $data['read_only'] = (bool) $data['read_only']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('primary', $data)) { + $object->setPrimary($data['primary']); + unset($data['primary']); + } + if (\array_key_exists('read_only', $data)) { + $object->setReadOnly($data['read_only']); + unset($data['read_only']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + if (\array_key_exists('related_fields', $data)) { + $values = []; + foreach ($data['related_fields'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setRelatedFields($values); + unset($data['related_fields']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => false]; - } + return $object; } -} else { - class UUIDFieldFieldSerializerWithRelatedFieldsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + if ($data->isInitialized('primary') && null !== $data->getPrimary()) { + $dataArray['primary'] = $data->getPrimary(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class === get_class($data); + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('primary', $data)) { - $object->setPrimary($data['primary']); - unset($data['primary']); - } - if (\array_key_exists('read_only', $data)) { - $object->setReadOnly($data['read_only']); - unset($data['read_only']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - if (\array_key_exists('related_fields', $data)) { - $values = []; - foreach ($data['related_fields'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\Field::class, 'json', $context); - } - $object->setRelatedFields($values); - unset($data['related_fields']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - if ($object->isInitialized('primary') && null !== $object->getPrimary()) { - $data['primary'] = $object->getPrimary(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UUIDFieldFieldSerializerWithRelatedFields::class => false]; } } diff --git a/generated/Normalizer/UUIDFieldUpdateFieldNormalizer.php b/generated/Normalizer/UUIDFieldUpdateFieldNormalizer.php index 537a547..41049e3 100644 --- a/generated/Normalizer/UUIDFieldUpdateFieldNormalizer.php +++ b/generated/Normalizer/UUIDFieldUpdateFieldNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,165 +20,81 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UUIDFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UUIDFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('description', $data) && null !== $data['description']) { + $object->setDescription($data['description']); + unset($data['description']); + } elseif (\array_key_exists('description', $data) && null === $data['description']) { + $object->setDescription(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => false]; - } + return $object; } -} else { - class UUIDFieldUpdateFieldNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('name') && null !== $data->getName()) { + $dataArray['name'] = $data->getName(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('description', $data) && null !== $data['description']) { - $object->setDescription($data['description']); - unset($data['description']); - } elseif (\array_key_exists('description', $data) && null === $data['description']) { - $object->setDescription(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('description') && null !== $data->getDescription()) { + $dataArray['description'] = $data->getDescription(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['name'] = $object->getName(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['description'] = $object->getDescription(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UUIDFieldUpdateField::class => false]; } } diff --git a/generated/Normalizer/UndoRedoActionNormalizer.php b/generated/Normalizer/UndoRedoActionNormalizer.php index 8aea1f9..5fa6ce4 100644 --- a/generated/Normalizer/UndoRedoActionNormalizer.php +++ b/generated/Normalizer/UndoRedoActionNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UndoRedoActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UndoRedoActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UndoRedoAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('action_type', $data) && null !== $data['action_type']) { - $object->setActionType($data['action_type']); - unset($data['action_type']); - } elseif (\array_key_exists('action_type', $data) && null === $data['action_type']) { - $object->setActionType(null); - } - if (\array_key_exists('action_scope', $data) && null !== $data['action_scope']) { - $object->setActionScope($data['action_scope']); - unset($data['action_scope']); - } elseif (\array_key_exists('action_scope', $data) && null === $data['action_scope']) { - $object->setActionScope(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UndoRedoAction(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('actionType') && null !== $object->getActionType()) { - $data['action_type'] = $object->getActionType(); - } - if ($object->isInitialized('actionScope') && null !== $object->getActionScope()) { - $data['action_scope'] = $object->getActionScope(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('action_type', $data) && null !== $data['action_type']) { + $object->setActionType($data['action_type']); + unset($data['action_type']); + } elseif (\array_key_exists('action_type', $data) && null === $data['action_type']) { + $object->setActionType(null); + } + if (\array_key_exists('action_scope', $data) && null !== $data['action_scope']) { + $object->setActionScope($data['action_scope']); + unset($data['action_scope']); + } elseif (\array_key_exists('action_scope', $data) && null === $data['action_scope']) { + $object->setActionScope(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => false]; - } + return $object; } -} else { - class UndoRedoActionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('actionType') && null !== $data->getActionType()) { + $dataArray['action_type'] = $data->getActionType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class === get_class($data); + if ($data->isInitialized('actionScope') && null !== $data->getActionScope()) { + $dataArray['action_scope'] = $data->getActionScope(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UndoRedoAction(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('action_type', $data) && null !== $data['action_type']) { - $object->setActionType($data['action_type']); - unset($data['action_type']); - } elseif (\array_key_exists('action_type', $data) && null === $data['action_type']) { - $object->setActionType(null); - } - if (\array_key_exists('action_scope', $data) && null !== $data['action_scope']) { - $object->setActionScope($data['action_scope']); - unset($data['action_scope']); - } elseif (\array_key_exists('action_scope', $data) && null === $data['action_scope']) { - $object->setActionScope(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('actionType') && null !== $object->getActionType()) { - $data['action_type'] = $object->getActionType(); - } - if ($object->isInitialized('actionScope') && null !== $object->getActionScope()) { - $data['action_scope'] = $object->getActionScope(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UndoRedoAction::class => false]; } } diff --git a/generated/Normalizer/UndoRedoResponseNormalizer.php b/generated/Normalizer/UndoRedoResponseNormalizer.php index 4fd3d78..81e46c4 100644 --- a/generated/Normalizer/UndoRedoResponseNormalizer.php +++ b/generated/Normalizer/UndoRedoResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,155 +20,76 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UndoRedoResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UndoRedoResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UndoRedoResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('actions', $data)) { - $values = []; - foreach ($data['actions'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class, 'json', $context); - } - $object->setActions($values); - unset($data['actions']); - } - if (\array_key_exists('result_code', $data)) { - $object->setResultCode($data['result_code']); - unset($data['result_code']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UndoRedoResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('actions', $data)) { $values = []; - foreach ($object->getActions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['actions'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class, 'json', $context); } - $data['actions'] = $values; - $data['result_code'] = $object->getResultCode(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setActions($values); + unset($data['actions']); + } + if (\array_key_exists('result_code', $data)) { + $object->setResultCode($data['result_code']); + unset($data['result_code']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => false]; - } + return $object; } -} else { - class UndoRedoResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getActions() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UndoRedoResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('actions', $data)) { - $values = []; - foreach ($data['actions'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UndoRedoAction::class, 'json', $context); - } - $object->setActions($values); - unset($data['actions']); - } - if (\array_key_exists('result_code', $data)) { - $object->setResultCode($data['result_code']); - unset($data['result_code']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + $dataArray['actions'] = $values; + $dataArray['result_code'] = $data->getResultCode(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getActions() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['actions'] = $values; - $data['result_code'] = $object->getResultCode(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UndoRedoResponse::class => false]; } } diff --git a/generated/Normalizer/UniqueRowValuesNormalizer.php b/generated/Normalizer/UniqueRowValuesNormalizer.php index f2204cc..6245f7f 100644 --- a/generated/Normalizer/UniqueRowValuesNormalizer.php +++ b/generated/Normalizer/UniqueRowValuesNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UniqueRowValuesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UniqueRowValuesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UniqueRowValues(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('values', $data)) { - $values = []; - foreach ($data['values'] as $value) { - $values[] = $value; - } - $object->setValues($values); - unset($data['values']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UniqueRowValues(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; + if (\array_key_exists('values', $data)) { $values = []; - foreach ($object->getValues() as $value) { + foreach ($data['values'] as $value) { $values[] = $value; } - $data['values'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setValues($values); + unset($data['values']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => false]; - } + return $object; } -} else { - class UniqueRowValuesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UniqueRowValues::class === get_class($data); + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getValues() as $value) { + $values[] = $value; } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); + $dataArray['values'] = $values; + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - $object = new \CedricZiel\Baserow\Generated\Model\UniqueRowValues(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('values', $data)) { - $values = []; - foreach ($data['values'] as $value) { - $values[] = $value; - } - $object->setValues($values); - unset($data['values']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getValues() as $value) { - $values[] = $value; - } - $data['values'] = $values; - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UniqueRowValues::class => false]; } } diff --git a/generated/Normalizer/UserAdminCreateNormalizer.php b/generated/Normalizer/UserAdminCreateNormalizer.php index cc75ea4..8916f4b 100644 --- a/generated/Normalizer/UserAdminCreateNormalizer.php +++ b/generated/Normalizer/UserAdminCreateNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,177 +20,93 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UserAdminCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UserAdminCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserAdminCreate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('is_staff', $data)) { - $object->setIsStaff($data['is_staff']); - unset($data['is_staff']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UserAdminCreate(); + if (\array_key_exists('is_active', $data) && \is_int($data['is_active'])) { + $data['is_active'] = (bool) $data['is_active']; + } + if (\array_key_exists('is_staff', $data) && \is_int($data['is_staff'])) { + $data['is_staff'] = (bool) $data['is_staff']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['username'] = $object->getUsername(); - $data['name'] = $object->getName(); - if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { - $data['is_active'] = $object->getIsActive(); - } - if ($object->isInitialized('isStaff') && null !== $object->getIsStaff()) { - $data['is_staff'] = $object->getIsStaff(); - } - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('is_active', $data)) { + $object->setIsActive($data['is_active']); + unset($data['is_active']); + } + if (\array_key_exists('is_staff', $data)) { + $object->setIsStaff($data['is_staff']); + unset($data['is_staff']); + } + if (\array_key_exists('password', $data)) { + $object->setPassword($data['password']); + unset($data['password']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => false]; - } + return $object; } -} else { - class UserAdminCreateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['username'] = $data->getUsername(); + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('isActive') && null !== $data->getIsActive()) { + $dataArray['is_active'] = $data->getIsActive(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminCreate::class === get_class($data); + if ($data->isInitialized('isStaff') && null !== $data->getIsStaff()) { + $dataArray['is_staff'] = $data->getIsStaff(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserAdminCreate(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); + $dataArray['password'] = $data->getPassword(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('is_staff', $data)) { - $object->setIsStaff($data['is_staff']); - unset($data['is_staff']); - } - if (\array_key_exists('password', $data)) { - $object->setPassword($data['password']); - unset($data['password']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['username'] = $object->getUsername(); - $data['name'] = $object->getName(); - if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { - $data['is_active'] = $object->getIsActive(); - } - if ($object->isInitialized('isStaff') && null !== $object->getIsStaff()) { - $data['is_staff'] = $object->getIsStaff(); - } - $data['password'] = $object->getPassword(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UserAdminCreate::class => false]; } } diff --git a/generated/Normalizer/UserAdminGroupsNormalizer.php b/generated/Normalizer/UserAdminGroupsNormalizer.php index 0977f42..6af38aa 100644 --- a/generated/Normalizer/UserAdminGroupsNormalizer.php +++ b/generated/Normalizer/UserAdminGroupsNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,153 +20,75 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UserAdminGroupsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UserAdminGroupsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserAdminGroups(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UserAdminGroups(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class UserAdminGroupsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class === $type; + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserAdminGroups(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['name'] = $data->getName(); + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $data->getPermissions(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['name'] = $object->getName(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UserAdminGroups::class => false]; } } diff --git a/generated/Normalizer/UserAdminResponseNormalizer.php b/generated/Normalizer/UserAdminResponseNormalizer.php index 3afcc08..51c0408 100644 --- a/generated/Normalizer/UserAdminResponseNormalizer.php +++ b/generated/Normalizer/UserAdminResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,259 +20,134 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UserAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UserAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserAdminResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('groups', $data)) { - $values = []; - foreach ($data['groups'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class, 'json', $context); - } - $object->setGroups($values); - unset($data['groups']); - } - if (\array_key_exists('workspaces', $data)) { - $values_1 = []; - foreach ($data['workspaces'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class, 'json', $context); - } - $object->setWorkspaces($values_1); - unset($data['workspaces']); - } - if (\array_key_exists('last_login', $data) && null !== $data['last_login']) { - $object->setLastLogin(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_login'])); - unset($data['last_login']); - } elseif (\array_key_exists('last_login', $data) && null === $data['last_login']) { - $object->setLastLogin(null); - } - if (\array_key_exists('date_joined', $data)) { - $object->setDateJoined(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['date_joined'])); - unset($data['date_joined']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('is_staff', $data)) { - $object->setIsStaff($data['is_staff']); - unset($data['is_staff']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UserAdminResponse(); + if (\array_key_exists('is_active', $data) && \is_int($data['is_active'])) { + $data['is_active'] = (bool) $data['is_active']; + } + if (\array_key_exists('is_staff', $data) && \is_int($data['is_staff'])) { + $data['is_staff'] = (bool) $data['is_staff']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['username'] = $object->getUsername(); - $data['name'] = $object->getName(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('groups', $data)) { $values = []; - foreach ($object->getGroups() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + foreach ($data['groups'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class, 'json', $context); } - $data['groups'] = $values; + $object->setGroups($values); + unset($data['groups']); + } + if (\array_key_exists('workspaces', $data)) { $values_1 = []; - foreach ($object->getWorkspaces() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + foreach ($data['workspaces'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class, 'json', $context); } - $data['workspaces'] = $values_1; - if ($object->isInitialized('lastLogin') && null !== $object->getLastLogin()) { - $data['last_login'] = $object->getLastLogin()->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('dateJoined') && null !== $object->getDateJoined()) { - $data['date_joined'] = $object->getDateJoined()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { - $data['is_active'] = $object->getIsActive(); - } - if ($object->isInitialized('isStaff') && null !== $object->getIsStaff()) { - $data['is_staff'] = $object->getIsStaff(); - } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + $object->setWorkspaces($values_1); + unset($data['workspaces']); + } + if (\array_key_exists('last_login', $data) && null !== $data['last_login']) { + $object->setLastLogin(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_login'])); + unset($data['last_login']); + } elseif (\array_key_exists('last_login', $data) && null === $data['last_login']) { + $object->setLastLogin(null); + } + if (\array_key_exists('date_joined', $data)) { + $object->setDateJoined(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['date_joined'])); + unset($data['date_joined']); + } + if (\array_key_exists('is_active', $data)) { + $object->setIsActive($data['is_active']); + unset($data['is_active']); + } + if (\array_key_exists('is_staff', $data)) { + $object->setIsStaff($data['is_staff']); + unset($data['is_staff']); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => false]; - } + return $object; } -} else { - class UserAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['username'] = $data->getUsername(); + $dataArray['name'] = $data->getName(); + $values = []; + foreach ($data->getGroups() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserAdminResponse::class === get_class($data); + $dataArray['groups'] = $values; + $values_1 = []; + foreach ($data->getWorkspaces() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserAdminResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('groups', $data)) { - $values = []; - foreach ($data['groups'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class, 'json', $context); - } - $object->setGroups($values); - unset($data['groups']); - } - if (\array_key_exists('workspaces', $data)) { - $values_1 = []; - foreach ($data['workspaces'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserAdminGroups::class, 'json', $context); - } - $object->setWorkspaces($values_1); - unset($data['workspaces']); - } - if (\array_key_exists('last_login', $data) && null !== $data['last_login']) { - $object->setLastLogin(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['last_login'])); - unset($data['last_login']); - } elseif (\array_key_exists('last_login', $data) && null === $data['last_login']) { - $object->setLastLogin(null); - } - if (\array_key_exists('date_joined', $data)) { - $object->setDateJoined(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['date_joined'])); - unset($data['date_joined']); - } - if (\array_key_exists('is_active', $data)) { - $object->setIsActive($data['is_active']); - unset($data['is_active']); - } - if (\array_key_exists('is_staff', $data)) { - $object->setIsStaff($data['is_staff']); - unset($data['is_staff']); - } - foreach ($data as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_2; - } - } - - return $object; + $dataArray['workspaces'] = $values_1; + if ($data->isInitialized('lastLogin') && null !== $data->getLastLogin()) { + $dataArray['last_login'] = $data->getLastLogin()->format('Y-m-d\TH:i:sP'); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['username'] = $object->getUsername(); - $data['name'] = $object->getName(); - $values = []; - foreach ($object->getGroups() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['groups'] = $values; - $values_1 = []; - foreach ($object->getWorkspaces() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['workspaces'] = $values_1; - if ($object->isInitialized('lastLogin') && null !== $object->getLastLogin()) { - $data['last_login'] = $object->getLastLogin()->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('dateJoined') && null !== $object->getDateJoined()) { - $data['date_joined'] = $object->getDateJoined()?->format('Y-m-d\TH:i:sP'); - } - if ($object->isInitialized('isActive') && null !== $object->getIsActive()) { - $data['is_active'] = $object->getIsActive(); - } - if ($object->isInitialized('isStaff') && null !== $object->getIsStaff()) { - $data['is_staff'] = $object->getIsStaff(); - } - foreach ($object as $key => $value_2) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_2; - } + if ($data->isInitialized('dateJoined') && null !== $data->getDateJoined()) { + $dataArray['date_joined'] = $data->getDateJoined()?->format('Y-m-d\TH:i:sP'); + } + if ($data->isInitialized('isActive') && null !== $data->getIsActive()) { + $dataArray['is_active'] = $data->getIsActive(); + } + if ($data->isInitialized('isStaff') && null !== $data->getIsStaff()) { + $dataArray['is_staff'] = $data->getIsStaff(); + } + foreach ($data as $key => $value_2) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UserAdminResponse::class => false]; } } diff --git a/generated/Normalizer/UserFileNormalizer.php b/generated/Normalizer/UserFileNormalizer.php index 4468531..7178187 100644 --- a/generated/Normalizer/UserFileNormalizer.php +++ b/generated/Normalizer/UserFileNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,243 +20,123 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UserFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UserFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UserFile::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserFile::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserFile::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserFile::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UserFile(); + if (\array_key_exists('is_image', $data) && \is_int($data['is_image'])) { + $data['is_image'] = (bool) $data['is_image']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); + if (\array_key_exists('size', $data)) { + $object->setSize($data['size']); + unset($data['size']); + } + if (\array_key_exists('mime_type', $data)) { + $object->setMimeType($data['mime_type']); + unset($data['mime_type']); + } + if (\array_key_exists('is_image', $data)) { + $object->setIsImage($data['is_image']); + unset($data['is_image']); + } + if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { + $object->setImageWidth($data['image_width']); + unset($data['image_width']); + } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { + $object->setImageWidth(null); + } + if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { + $object->setImageHeight($data['image_height']); + unset($data['image_height']); + } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { + $object->setImageHeight(null); + } + if (\array_key_exists('uploaded_at', $data)) { + $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); + unset($data['uploaded_at']); + } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + if (\array_key_exists('thumbnails', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['thumbnails'] as $key => $value) { + $values[$key] = $value; } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setThumbnails($values); + unset($data['thumbnails']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('original_name', $data)) { + $object->setOriginalName($data['original_name']); + unset($data['original_name']); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserFile::class => false]; - } + return $object; } -} else { - class UserFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserFile::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['size'] = $data->getSize(); + if ($data->isInitialized('mimeType') && null !== $data->getMimeType()) { + $dataArray['mime_type'] = $data->getMimeType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserFile::class === get_class($data); + if ($data->isInitialized('isImage') && null !== $data->getIsImage()) { + $dataArray['is_image'] = $data->getIsImage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserFile(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('size', $data)) { - $object->setSize($data['size']); - unset($data['size']); - } - if (\array_key_exists('mime_type', $data)) { - $object->setMimeType($data['mime_type']); - unset($data['mime_type']); - } - if (\array_key_exists('is_image', $data)) { - $object->setIsImage($data['is_image']); - unset($data['is_image']); - } - if (\array_key_exists('image_width', $data) && null !== $data['image_width']) { - $object->setImageWidth($data['image_width']); - unset($data['image_width']); - } elseif (\array_key_exists('image_width', $data) && null === $data['image_width']) { - $object->setImageWidth(null); - } - if (\array_key_exists('image_height', $data) && null !== $data['image_height']) { - $object->setImageHeight($data['image_height']); - unset($data['image_height']); - } elseif (\array_key_exists('image_height', $data) && null === $data['image_height']) { - $object->setImageHeight(null); - } - if (\array_key_exists('uploaded_at', $data)) { - $object->setUploadedAt(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['uploaded_at'])); - unset($data['uploaded_at']); - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - if (\array_key_exists('thumbnails', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['thumbnails'] as $key => $value) { - $values[$key] = $value; - } - $object->setThumbnails($values); - unset($data['thumbnails']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('original_name', $data)) { - $object->setOriginalName($data['original_name']); - unset($data['original_name']); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; + if ($data->isInitialized('imageWidth') && null !== $data->getImageWidth()) { + $dataArray['image_width'] = $data->getImageWidth(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['size'] = $object->getSize(); - if ($object->isInitialized('mimeType') && null !== $object->getMimeType()) { - $data['mime_type'] = $object->getMimeType(); - } - if ($object->isInitialized('isImage') && null !== $object->getIsImage()) { - $data['is_image'] = $object->getIsImage(); - } - if ($object->isInitialized('imageWidth') && null !== $object->getImageWidth()) { - $data['image_width'] = $object->getImageWidth(); - } - if ($object->isInitialized('imageHeight') && null !== $object->getImageHeight()) { - $data['image_height'] = $object->getImageHeight(); - } - $data['original_name'] = $object->getOriginalName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('imageHeight') && null !== $data->getImageHeight()) { + $dataArray['image_height'] = $data->getImageHeight(); + } + $dataArray['original_name'] = $data->getOriginalName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserFile::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UserFile::class => false]; } } diff --git a/generated/Normalizer/UserFileUploadViaURLRequestNormalizer.php b/generated/Normalizer/UserFileUploadViaURLRequestNormalizer.php index 79afdd4..156a32f 100644 --- a/generated/Normalizer/UserFileUploadViaURLRequestNormalizer.php +++ b/generated/Normalizer/UserFileUploadViaURLRequestNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UserFileUploadViaURLRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UserFileUploadViaURLRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['url'] = $object->getUrl(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('url', $data)) { + $object->setUrl($data['url']); + unset($data['url']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => false]; - } + return $object; } -} else { - class UserFileUploadViaURLRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('url', $data)) { - $object->setUrl($data['url']); - unset($data['url']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['url'] = $data->getUrl(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['url'] = $object->getUrl(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UserFileUploadViaURLRequest::class => false]; } } diff --git a/generated/Normalizer/UserNormalizer.php b/generated/Normalizer/UserNormalizer.php index 9d2872d..a7ac5a9 100644 --- a/generated/Normalizer/UserNormalizer.php +++ b/generated/Normalizer/UserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\User::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\User::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\User::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\User::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\User(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['username'] = $object->getUsername(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\User::class => false]; - } + return $object; } -} else { - class UserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\User::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\User::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\User(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['username'] = $data->getUsername(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['username'] = $object->getUsername(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\User::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\User::class => false]; } } diff --git a/generated/Normalizer/UserSourceUserNormalizer.php b/generated/Normalizer/UserSourceUserNormalizer.php index b199fd1..ddd9aa4 100644 --- a/generated/Normalizer/UserSourceUserNormalizer.php +++ b/generated/Normalizer/UserSourceUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,169 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UserSourceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UserSourceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UserSourceUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserSourceUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserSourceUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserSourceUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserSourceUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('user_source_id', $data)) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } - if (\array_key_exists('role', $data)) { - $object->setRole($data['role']); - unset($data['role']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UserSourceUser(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['username'] = $object->getUsername(); - $data['email'] = $object->getEmail(); - $data['user_source_id'] = $object->getUserSourceId(); - $data['role'] = $object->getRole(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserSourceUser::class => false]; + if (\array_key_exists('username', $data)) { + $object->setUsername($data['username']); + unset($data['username']); } - } -} else { - class UserSourceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserSourceUser::class === $type; + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserSourceUser::class === get_class($data); + if (\array_key_exists('user_source_id', $data)) { + $object->setUserSourceId($data['user_source_id']); + unset($data['user_source_id']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserSourceUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('username', $data)) { - $object->setUsername($data['username']); - unset($data['username']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('user_source_id', $data)) { - $object->setUserSourceId($data['user_source_id']); - unset($data['user_source_id']); - } - if (\array_key_exists('role', $data)) { - $object->setRole($data['role']); - unset($data['role']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('role', $data)) { + $object->setRole($data['role']); + unset($data['role']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['username'] = $object->getUsername(); - $data['email'] = $object->getEmail(); - $data['user_source_id'] = $object->getUserSourceId(); - $data['role'] = $object->getRole(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['username'] = $data->getUsername(); + $dataArray['email'] = $data->getEmail(); + $dataArray['user_source_id'] = $data->getUserSourceId(); + $dataArray['role'] = $data->getRole(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserSourceUser::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UserSourceUser::class => false]; } } diff --git a/generated/Normalizer/UserWorkspaceInvitationNormalizer.php b/generated/Normalizer/UserWorkspaceInvitationNormalizer.php index 59a7fdd..8414599 100644 --- a/generated/Normalizer/UserWorkspaceInvitationNormalizer.php +++ b/generated/Normalizer/UserWorkspaceInvitationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,185 +20,94 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UserWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UserWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('invited_by', $data)) { - $object->setInvitedBy($data['invited_by']); - unset($data['invited_by']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('email_exists', $data)) { - $object->setEmailExists($data['email_exists']); - unset($data['email_exists']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation(); + if (\array_key_exists('email_exists', $data) && \is_int($data['email_exists'])) { + $data['email_exists'] = (bool) $data['email_exists']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['email'] = $object->getEmail(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => false]; + if (\array_key_exists('invited_by', $data)) { + $object->setInvitedBy($data['invited_by']); + unset($data['invited_by']); } - } -} else { - class UserWorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class === $type; + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class === get_class($data); + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('invited_by', $data)) { - $object->setInvitedBy($data['invited_by']); - unset($data['invited_by']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('email_exists', $data)) { - $object->setEmailExists($data['email_exists']); - unset($data['email_exists']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); + } + if (\array_key_exists('message', $data)) { + $object->setMessage($data['message']); + unset($data['message']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('email_exists', $data)) { + $object->setEmailExists($data['email_exists']); + unset($data['email_exists']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['email'] = $object->getEmail(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['email'] = $data->getEmail(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UserWorkspaceInvitation::class => false]; } } diff --git a/generated/Normalizer/UsersPerUserSourceNormalizer.php b/generated/Normalizer/UsersPerUserSourceNormalizer.php index 39a2218..b508a9d 100644 --- a/generated/Normalizer/UsersPerUserSourceNormalizer.php +++ b/generated/Normalizer/UsersPerUserSourceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class UsersPerUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class UsersPerUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UsersPerUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('users_per_user_sources', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['users_per_user_sources'] as $key => $value) { - $values_1 = []; - foreach ($value as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserSourceUser::class, 'json', $context); - } - $values[$key] = $values_1; - } - $object->setUsersPerUserSources($values); - unset($data['users_per_user_sources']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\UsersPerUserSource(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $values = []; - foreach ($object->getUsersPerUserSources() as $key => $value) { + if (\array_key_exists('users_per_user_sources', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['users_per_user_sources'] as $key => $value) { $values_1 = []; foreach ($value as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserSourceUser::class, 'json', $context); } $values[$key] = $values_1; } - $data['users_per_user_sources'] = $values; - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } + $object->setUsersPerUserSources($values); + unset($data['users_per_user_sources']); + } + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => false]; - } + return $object; } -} else { - class UsersPerUserSourceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class === $type; - } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class === get_class($data); - } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\UsersPerUserSource(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('users_per_user_sources', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['users_per_user_sources'] as $key => $value) { - $values_1 = []; - foreach ($value as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\UserSourceUser::class, 'json', $context); - } - $values[$key] = $values_1; - } - $object->setUsersPerUserSources($values); - unset($data['users_per_user_sources']); - } - foreach ($data as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_2; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $values = []; + foreach ($data->getUsersPerUserSources() as $key => $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - - return $object; + $values[$key] = $values_1; } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $values = []; - foreach ($object->getUsersPerUserSources() as $key => $value) { - $values_1 = []; - foreach ($value as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $values[$key] = $values_1; - } - $data['users_per_user_sources'] = $values; - foreach ($object as $key_1 => $value_2) { - if (preg_match('/.*/', (string) $key_1)) { - $data[$key_1] = $value_2; - } + $dataArray['users_per_user_sources'] = $values; + foreach ($data as $key_1 => $value_2) { + if (preg_match('/.*/', (string) $key_1)) { + $dataArray[$key_1] = $value_2; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\UsersPerUserSource::class => false]; } } diff --git a/generated/Normalizer/VerifyEmailAddressNormalizer.php b/generated/Normalizer/VerifyEmailAddressNormalizer.php index f3bab99..5d0b31f 100644 --- a/generated/Normalizer/VerifyEmailAddressNormalizer.php +++ b/generated/Normalizer/VerifyEmailAddressNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,129 +20,63 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class VerifyEmailAddressNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class VerifyEmailAddressNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['token'] = $object->getToken(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('token', $data)) { + $object->setToken($data['token']); + unset($data['token']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => false]; - } + return $object; } -} else { - class VerifyEmailAddressNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class === $type; - } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class === get_class($data); - } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\VerifyEmailAddress(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('token', $data)) { - $object->setToken($data['token']); - unset($data['token']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['token'] = $data->getToken(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['token'] = $object->getToken(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\VerifyEmailAddress::class => false]; } } diff --git a/generated/Normalizer/ViewDecorationNormalizer.php b/generated/Normalizer/ViewDecorationNormalizer.php index 8f50432..77c411f 100644 --- a/generated/Normalizer/ViewDecorationNormalizer.php +++ b/generated/Normalizer/ViewDecorationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,197 +20,97 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ViewDecoration::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewDecoration::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewDecoration::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewDecoration::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($data['value_provider_conf']); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ViewDecoration(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $object->getValueProviderConf(); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value_provider_type', $data)) { + $object->setValueProviderType($data['value_provider_type']); + unset($data['value_provider_type']); + } + if (\array_key_exists('value_provider_conf', $data)) { + $object->setValueProviderConf($data['value_provider_conf']); + unset($data['value_provider_conf']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewDecoration::class => false]; - } + return $object; } -} else { - class ViewDecorationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewDecoration::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('view') && null !== $data->getView()) { + $dataArray['view'] = $data->getView(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewDecoration::class === get_class($data); + if ($data->isInitialized('type') && null !== $data->getType()) { + $dataArray['type'] = $data->getType(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewDecoration(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value_provider_type', $data)) { - $object->setValueProviderType($data['value_provider_type']); - unset($data['value_provider_type']); - } - if (\array_key_exists('value_provider_conf', $data)) { - $object->setValueProviderConf($data['value_provider_conf']); - unset($data['value_provider_conf']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if ($data->isInitialized('valueProviderType') && null !== $data->getValueProviderType()) { + $dataArray['value_provider_type'] = $data->getValueProviderType(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('view') && null !== $object->getView()) { - $data['view'] = $object->getView(); - } - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['type'] = $object->getType(); - } - if ($object->isInitialized('valueProviderType') && null !== $object->getValueProviderType()) { - $data['value_provider_type'] = $object->getValueProviderType(); - } - if ($object->isInitialized('valueProviderConf') && null !== $object->getValueProviderConf()) { - $data['value_provider_conf'] = $object->getValueProviderConf(); - } - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if ($data->isInitialized('valueProviderConf') && null !== $data->getValueProviderConf()) { + $dataArray['value_provider_conf'] = $data->getValueProviderConf(); + } + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewDecoration::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ViewDecoration::class => false]; } } diff --git a/generated/Normalizer/ViewFilterGroupNormalizer.php b/generated/Normalizer/ViewFilterGroupNormalizer.php index 75f135b..9fc73ff 100644 --- a/generated/Normalizer/ViewFilterGroupNormalizer.php +++ b/generated/Normalizer/ViewFilterGroupNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,169 +20,83 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewFilterGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { - $object->setParentGroup($data['parent_group']); - unset($data['parent_group']); - } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { - $object->setParentGroup(null); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ViewFilterGroup(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - $data['view'] = $object->getView(); - if ($object->isInitialized('parentGroup') && null !== $object->getParentGroup()) { - $data['parent_group'] = $object->getParentGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); + } + if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { + $object->setParentGroup($data['parent_group']); + unset($data['parent_group']); + } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { + $object->setParentGroup(null); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => false]; - } + return $object; } -} else { - class ViewFilterGroupNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class === get_class($data); + $dataArray['view'] = $data->getView(); + if ($data->isInitialized('parentGroup') && null !== $data->getParentGroup()) { + $dataArray['parent_group'] = $data->getParentGroup(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewFilterGroup(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('parent_group', $data) && null !== $data['parent_group']) { - $object->setParentGroup($data['parent_group']); - unset($data['parent_group']); - } elseif (\array_key_exists('parent_group', $data) && null === $data['parent_group']) { - $object->setParentGroup(null); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - $data['view'] = $object->getView(); - if ($object->isInitialized('parentGroup') && null !== $object->getParentGroup()) { - $data['parent_group'] = $object->getParentGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class => false]; } } diff --git a/generated/Normalizer/ViewFilterNormalizer.php b/generated/Normalizer/ViewFilterNormalizer.php index 31e051e..232d9b6 100644 --- a/generated/Normalizer/ViewFilterNormalizer.php +++ b/generated/Normalizer/ViewFilterNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,205 +20,101 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ViewFilter::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewFilter::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewFilter::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewFilter::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); - } - if (\array_key_exists('preload_values', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['preload_values'] as $key => $value) { - $values[$key] = $value; - } - $object->setPreloadValues($values); - unset($data['preload_values']); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ViewFilter(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); + } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('value', $data)) { + $object->setValue($data['value']); + unset($data['value']); + } + if (\array_key_exists('preload_values', $data)) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['preload_values'] as $key => $value) { + $values[$key] = $value; } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + $object->setPreloadValues($values); + unset($data['preload_values']); + } + if (\array_key_exists('group', $data) && null !== $data['group']) { + $object->setGroup($data['group']); + unset($data['group']); + } elseif (\array_key_exists('group', $data) && null === $data['group']) { + $object->setGroup(null); + } + foreach ($data as $key_1 => $value_1) { + if (preg_match('/.*/', (string) $key_1)) { + $object[$key_1] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewFilter::class => false]; - } + return $object; } -} else { - class ViewFilterNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewFilter::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['view'] = $data->getView(); + $dataArray['field'] = $data->getField(); + $dataArray['type'] = $data->getType(); + if ($data->isInitialized('value') && null !== $data->getValue()) { + $dataArray['value'] = $data->getValue(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewFilter::class === get_class($data); + if ($data->isInitialized('group') && null !== $data->getGroup()) { + $dataArray['group'] = $data->getGroup(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewFilter(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('value', $data)) { - $object->setValue($data['value']); - unset($data['value']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('preload_values', $data)) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['preload_values'] as $key => $value) { - $values[$key] = $value; - } - $object->setPreloadValues($values); - unset($data['preload_values']); - } - if (\array_key_exists('group', $data) && null !== $data['group']) { - $object->setGroup($data['group']); - unset($data['group']); - } elseif (\array_key_exists('group', $data) && null === $data['group']) { - $object->setGroup(null); - } - foreach ($data as $key_1 => $value_1) { - if (preg_match('/.*/', (string) $key_1)) { - $object[$key_1] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - $data['type'] = $object->getType(); - if ($object->isInitialized('value') && null !== $object->getValue()) { - $data['value'] = $object->getValue(); - } - if ($object->isInitialized('group') && null !== $object->getGroup()) { - $data['group'] = $object->getGroup(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewFilter::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ViewFilter::class => false]; } } diff --git a/generated/Normalizer/ViewGroupByNormalizer.php b/generated/Normalizer/ViewGroupByNormalizer.php index fd41268..86e0d29 100644 --- a/generated/Normalizer/ViewGroupByNormalizer.php +++ b/generated/Normalizer/ViewGroupByNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,175 +20,86 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewGroupBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ViewGroupBy(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); + } + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); + } + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); + } + if (\array_key_exists('width', $data)) { + $object->setWidth($data['width']); + unset($data['width']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => false]; - } + return $object; } -} else { - class ViewGroupByNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['view'] = $data->getView(); + $dataArray['field'] = $data->getField(); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class === get_class($data); + if ($data->isInitialized('width') && null !== $data->getWidth()) { + $dataArray['width'] = $data->getWidth(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewGroupBy(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('width', $data)) { - $object->setWidth($data['width']); - unset($data['width']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - if ($object->isInitialized('width') && null !== $object->getWidth()) { - $data['width'] = $object->getWidth(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ViewGroupBy::class => false]; } } diff --git a/generated/Normalizer/ViewNormalizer.php b/generated/Normalizer/ViewNormalizer.php index b062c65..2743159 100644 --- a/generated/Normalizer/ViewNormalizer.php +++ b/generated/Normalizer/ViewNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,397 +20,206 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\View::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\View::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\View::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\View::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\View(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); - } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); - } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); - } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); - } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); - } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\View(); + if (\array_key_exists('filters_disabled', $data) && \is_int($data['filters_disabled'])) { + $data['filters_disabled'] = (bool) $data['filters_disabled']; + } + if (\array_key_exists('public_view_has_password', $data) && \is_int($data['public_view_has_password'])) { + $data['public_view_has_password'] = (bool) $data['public_view_has_password']; + } + if (\array_key_exists('show_logo', $data) && \is_int($data['show_logo'])) { + $data['show_logo'] = (bool) $data['show_logo']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; - } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; - } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); - } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); - } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); - } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\View::class => false]; + if (\array_key_exists('table_id', $data)) { + $object->setTableId($data['table_id']); + unset($data['table_id']); } - } -} else { - class ViewNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\View::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\View::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\View(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('table_id', $data)) { - $object->setTableId($data['table_id']); - unset($data['table_id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('type', $data)) { - $object->setType($data['type']); - unset($data['type']); - } - if (\array_key_exists('table', $data)) { - $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); - unset($data['table']); - } - if (\array_key_exists('filter_type', $data)) { - $object->setFilterType($data['filter_type']); - unset($data['filter_type']); - } - if (\array_key_exists('filters', $data)) { - $values = []; - foreach ($data['filters'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); - } - $object->setFilters($values); - unset($data['filters']); - } - if (\array_key_exists('filter_groups', $data)) { - $values_1 = []; - foreach ($data['filter_groups'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); - } - $object->setFilterGroups($values_1); - unset($data['filter_groups']); - } - if (\array_key_exists('sortings', $data)) { - $values_2 = []; - foreach ($data['sortings'] as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); - } - $object->setSortings($values_2); - unset($data['sortings']); - } - if (\array_key_exists('group_bys', $data)) { - $values_3 = []; - foreach ($data['group_bys'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); - } - $object->setGroupBys($values_3); - unset($data['group_bys']); - } - if (\array_key_exists('decorations', $data)) { - $values_4 = []; - foreach ($data['decorations'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); - } - $object->setDecorations($values_4); - unset($data['decorations']); - } - if (\array_key_exists('filters_disabled', $data)) { - $object->setFiltersDisabled($data['filters_disabled']); - unset($data['filters_disabled']); + if (\array_key_exists('type', $data)) { + $object->setType($data['type']); + unset($data['type']); + } + if (\array_key_exists('table', $data)) { + $object->setTable($this->denormalizer->denormalize($data['table'], \CedricZiel\Baserow\Generated\Model\Table::class, 'json', $context)); + unset($data['table']); + } + if (\array_key_exists('filter_type', $data)) { + $object->setFilterType($data['filter_type']); + unset($data['filter_type']); + } + if (\array_key_exists('filters', $data)) { + $values = []; + foreach ($data['filters'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\ViewFilter::class, 'json', $context); } - if (\array_key_exists('public_view_has_password', $data)) { - $object->setPublicViewHasPassword($data['public_view_has_password']); - unset($data['public_view_has_password']); + $object->setFilters($values); + unset($data['filters']); + } + if (\array_key_exists('filter_groups', $data)) { + $values_1 = []; + foreach ($data['filter_groups'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \CedricZiel\Baserow\Generated\Model\ViewFilterGroup::class, 'json', $context); } - if (\array_key_exists('show_logo', $data)) { - $object->setShowLogo($data['show_logo']); - unset($data['show_logo']); + $object->setFilterGroups($values_1); + unset($data['filter_groups']); + } + if (\array_key_exists('sortings', $data)) { + $values_2 = []; + foreach ($data['sortings'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \CedricZiel\Baserow\Generated\Model\ViewSort::class, 'json', $context); } - if (\array_key_exists('ownership_type', $data)) { - $object->setOwnershipType($data['ownership_type']); - unset($data['ownership_type']); + $object->setSortings($values_2); + unset($data['sortings']); + } + if (\array_key_exists('group_bys', $data)) { + $values_3 = []; + foreach ($data['group_bys'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \CedricZiel\Baserow\Generated\Model\ViewGroupBy::class, 'json', $context); } - if (\array_key_exists('owned_by_id', $data)) { - $object->setOwnedById($data['owned_by_id']); - unset($data['owned_by_id']); + $object->setGroupBys($values_3); + unset($data['group_bys']); + } + if (\array_key_exists('decorations', $data)) { + $values_4 = []; + foreach ($data['decorations'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \CedricZiel\Baserow\Generated\Model\ViewDecoration::class, 'json', $context); } - foreach ($data as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_5; - } + $object->setDecorations($values_4); + unset($data['decorations']); + } + if (\array_key_exists('filters_disabled', $data)) { + $object->setFiltersDisabled($data['filters_disabled']); + unset($data['filters_disabled']); + } + if (\array_key_exists('public_view_has_password', $data)) { + $object->setPublicViewHasPassword($data['public_view_has_password']); + unset($data['public_view_has_password']); + } + if (\array_key_exists('show_logo', $data)) { + $object->setShowLogo($data['show_logo']); + unset($data['show_logo']); + } + if (\array_key_exists('ownership_type', $data)) { + $object->setOwnershipType($data['ownership_type']); + unset($data['ownership_type']); + } + if (\array_key_exists('owned_by_id', $data)) { + $object->setOwnedById($data['owned_by_id']); + unset($data['owned_by_id']); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_5; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $data['order'] = $object->getOrder(); - $data['table'] = $this->normalizer->normalize($object->getTable(), 'json', $context); - if ($object->isInitialized('filterType') && null !== $object->getFilterType()) { - $data['filter_type'] = $object->getFilterType(); - } - if ($object->isInitialized('filters') && null !== $object->getFilters()) { - $values = []; - foreach ($object->getFilters() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['filters'] = $values; - } - if ($object->isInitialized('filterGroups') && null !== $object->getFilterGroups()) { - $values_1 = []; - foreach ($object->getFilterGroups() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); - } - $data['filter_groups'] = $values_1; - } - if ($object->isInitialized('sortings') && null !== $object->getSortings()) { - $values_2 = []; - foreach ($object->getSortings() as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $data['sortings'] = $values_2; - } - if ($object->isInitialized('groupBys') && null !== $object->getGroupBys()) { - $values_3 = []; - foreach ($object->getGroupBys() as $value_3) { - $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); - } - $data['group_bys'] = $values_3; + return $object; + } + + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $dataArray['order'] = $data->getOrder(); + $dataArray['table'] = $this->normalizer->normalize($data->getTable(), 'json', $context); + if ($data->isInitialized('filterType') && null !== $data->getFilterType()) { + $dataArray['filter_type'] = $data->getFilterType(); + } + if ($data->isInitialized('filters') && null !== $data->getFilters()) { + $values = []; + foreach ($data->getFilters() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - if ($object->isInitialized('decorations') && null !== $object->getDecorations()) { - $values_4 = []; - foreach ($object->getDecorations() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); - } - $data['decorations'] = $values_4; + $dataArray['filters'] = $values; + } + if ($data->isInitialized('filterGroups') && null !== $data->getFilterGroups()) { + $values_1 = []; + foreach ($data->getFilterGroups() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - if ($object->isInitialized('filtersDisabled') && null !== $object->getFiltersDisabled()) { - $data['filters_disabled'] = $object->getFiltersDisabled(); + $dataArray['filter_groups'] = $values_1; + } + if ($data->isInitialized('sortings') && null !== $data->getSortings()) { + $values_2 = []; + foreach ($data->getSortings() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - if ($object->isInitialized('showLogo') && null !== $object->getShowLogo()) { - $data['show_logo'] = $object->getShowLogo(); + $dataArray['sortings'] = $values_2; + } + if ($data->isInitialized('groupBys') && null !== $data->getGroupBys()) { + $values_3 = []; + foreach ($data->getGroupBys() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - $data['ownership_type'] = $object->getOwnershipType(); - if ($object->isInitialized('ownedById') && null !== $object->getOwnedById()) { - $data['owned_by_id'] = $object->getOwnedById(); + $dataArray['group_bys'] = $values_3; + } + if ($data->isInitialized('decorations') && null !== $data->getDecorations()) { + $values_4 = []; + foreach ($data->getDecorations() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); } - foreach ($object as $key => $value_5) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_5; - } + $dataArray['decorations'] = $values_4; + } + if ($data->isInitialized('filtersDisabled') && null !== $data->getFiltersDisabled()) { + $dataArray['filters_disabled'] = $data->getFiltersDisabled(); + } + if ($data->isInitialized('showLogo') && null !== $data->getShowLogo()) { + $dataArray['show_logo'] = $data->getShowLogo(); + } + $dataArray['ownership_type'] = $data->getOwnershipType(); + if ($data->isInitialized('ownedById') && null !== $data->getOwnedById()) { + $dataArray['owned_by_id'] = $data->getOwnedById(); + } + foreach ($data as $key => $value_5) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_5; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\View::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\View::class => false]; } } diff --git a/generated/Normalizer/ViewSortNormalizer.php b/generated/Normalizer/ViewSortNormalizer.php index cb96513..359878e 100644 --- a/generated/Normalizer/ViewSortNormalizer.php +++ b/generated/Normalizer/ViewSortNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,161 +20,79 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class ViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\ViewSort::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewSort::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewSort::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewSort::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewSort(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\ViewSort(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewSort::class => false]; + if (\array_key_exists('view', $data)) { + $object->setView($data['view']); + unset($data['view']); } - } -} else { - class ViewSortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\ViewSort::class === $type; + if (\array_key_exists('field', $data)) { + $object->setField($data['field']); + unset($data['field']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\ViewSort::class === get_class($data); + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\ViewSort(); - if (null === $data || false === \is_array($data)) { - return $object; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('view', $data)) { - $object->setView($data['view']); - unset($data['view']); - } - if (\array_key_exists('field', $data)) { - $object->setField($data['field']); - unset($data['field']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['view'] = $object->getView(); - $data['field'] = $object->getField(); - if ($object->isInitialized('order') && null !== $object->getOrder()) { - $data['order'] = $object->getOrder(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['view'] = $data->getView(); + $dataArray['field'] = $data->getField(); + if ($data->isInitialized('order') && null !== $data->getOrder()) { + $dataArray['order'] = $data->getOrder(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\ViewSort::class => false]; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\ViewSort::class => false]; } } diff --git a/generated/Normalizer/WorkspaceAdminUsersNormalizer.php b/generated/Normalizer/WorkspaceAdminUsersNormalizer.php index f5d4cd2..4243bd5 100644 --- a/generated/Normalizer/WorkspaceAdminUsersNormalizer.php +++ b/generated/Normalizer/WorkspaceAdminUsersNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,153 +20,75 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class WorkspaceAdminUsersNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class WorkspaceAdminUsersNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['id'] = $object->getId(); - $data['email'] = $object->getEmail(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => false]; + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - } -} else { - class WorkspaceAdminUsersNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class === $type; + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class === get_class($data); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } + return $object; + } - return $object; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['id'] = $data->getId(); + $dataArray['email'] = $data->getEmail(); + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $data->getPermissions(); } - - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['id'] = $object->getId(); - $data['email'] = $object->getEmail(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class => false]; } } diff --git a/generated/Normalizer/WorkspaceInvitationNormalizer.php b/generated/Normalizer/WorkspaceInvitationNormalizer.php index 9e0e384..14708c4 100644 --- a/generated/Normalizer/WorkspaceInvitationNormalizer.php +++ b/generated/Normalizer/WorkspaceInvitationNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,193 +20,95 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class WorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class WorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - $data['email'] = $object->getEmail(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - if ($object->isInitialized('message') && null !== $object->getMessage()) { - $data['message'] = $object->getMessage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); + } + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); + } + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); + } + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); + } + if (\array_key_exists('message', $data)) { + $object->setMessage($data['message']); + unset($data['message']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => false]; - } + return $object; } -} else { - class WorkspaceInvitationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['group'] = $data->getGroup(); + $dataArray['workspace'] = $data->getWorkspace(); + $dataArray['email'] = $data->getEmail(); + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $data->getPermissions(); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class === get_class($data); + if ($data->isInitialized('message') && null !== $data->getMessage()) { + $dataArray['message'] = $data->getMessage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceInvitation(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('message', $data)) { - $object->setMessage($data['message']); - unset($data['message']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - $data['email'] = $object->getEmail(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - if ($object->isInitialized('message') && null !== $object->getMessage()) { - $data['message'] = $object->getMessage(); - } - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\WorkspaceInvitation::class => false]; } } diff --git a/generated/Normalizer/WorkspaceNormalizer.php b/generated/Normalizer/WorkspaceNormalizer.php index a0e137b..d194d77 100644 --- a/generated/Normalizer/WorkspaceNormalizer.php +++ b/generated/Normalizer/WorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,145 +20,71 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class WorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class WorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\Workspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Workspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\Workspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Workspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Workspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - - return $object; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + $object = new \CedricZiel\Baserow\Generated\Model\Workspace(); + if (null === $data || false === \is_array($data)) { + return $object; } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Workspace::class => false]; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - } -} else { - class WorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\Workspace::class === $type; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\Workspace::class === get_class($data); + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\Workspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\Workspace::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\Workspace::class => false]; } } diff --git a/generated/Normalizer/WorkspaceUserEnterpriseTeamNormalizer.php b/generated/Normalizer/WorkspaceUserEnterpriseTeamNormalizer.php index 0bf9e19..6aa5f9d 100644 --- a/generated/Normalizer/WorkspaceUserEnterpriseTeamNormalizer.php +++ b/generated/Normalizer/WorkspaceUserEnterpriseTeamNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,135 +20,66 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class WorkspaceUserEnterpriseTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class WorkspaceUserEnterpriseTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class WorkspaceUserEnterpriseTeamNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class === $type; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; + } } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class === get_class($data); - } + return $object; + } - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\WorkspaceUserEnterpriseTeam::class => false]; } } diff --git a/generated/Normalizer/WorkspaceUserNormalizer.php b/generated/Normalizer/WorkspaceUserNormalizer.php index 52db822..db00a91 100644 --- a/generated/Normalizer/WorkspaceUserNormalizer.php +++ b/generated/Normalizer/WorkspaceUserNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,203 +20,103 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class WorkspaceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class WorkspaceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('user_id', $data)) { - $object->setUserId($data['user_id']); - unset($data['user_id']); - } - if (\array_key_exists('to_be_deleted', $data)) { - $object->setToBeDeleted($data['to_be_deleted']); - unset($data['to_be_deleted']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUser(); + if (\array_key_exists('to_be_deleted', $data) && \is_int($data['to_be_deleted'])) { + $data['to_be_deleted'] = (bool) $data['to_be_deleted']; + } + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - $data['to_be_deleted'] = $object->getToBeDeleted(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } - - return $data; + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => false]; + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); } - } -} else { - class WorkspaceUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class === $type; + if (\array_key_exists('email', $data)) { + $object->setEmail($data['email']); + unset($data['email']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class === get_class($data); + if (\array_key_exists('group', $data)) { + $object->setGroup($data['group']); + unset($data['group']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUser(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('email', $data)) { - $object->setEmail($data['email']); - unset($data['email']); - } - if (\array_key_exists('group', $data)) { - $object->setGroup($data['group']); - unset($data['group']); - } - if (\array_key_exists('workspace', $data)) { - $object->setWorkspace($data['workspace']); - unset($data['workspace']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - if (\array_key_exists('user_id', $data)) { - $object->setUserId($data['user_id']); - unset($data['user_id']); - } - if (\array_key_exists('to_be_deleted', $data)) { - $object->setToBeDeleted($data['to_be_deleted']); - unset($data['to_be_deleted']); - } - foreach ($data as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value; - } + if (\array_key_exists('workspace', $data)) { + $object->setWorkspace($data['workspace']); + unset($data['workspace']); + } + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + if (\array_key_exists('user_id', $data)) { + $object->setUserId($data['user_id']); + unset($data['user_id']); + } + if (\array_key_exists('to_be_deleted', $data)) { + $object->setToBeDeleted($data['to_be_deleted']); + unset($data['to_be_deleted']); + } + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['group'] = $object->getGroup(); - $data['workspace'] = $object->getWorkspace(); - if ($object->isInitialized('permissions') && null !== $object->getPermissions()) { - $data['permissions'] = $object->getPermissions(); - } - $data['to_be_deleted'] = $object->getToBeDeleted(); - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['group'] = $data->getGroup(); + $dataArray['workspace'] = $data->getWorkspace(); + if ($data->isInitialized('permissions') && null !== $data->getPermissions()) { + $dataArray['permissions'] = $data->getPermissions(); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => false]; + $dataArray['to_be_deleted'] = $data->getToBeDeleted(); + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } + + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\WorkspaceUser::class => false]; } } diff --git a/generated/Normalizer/WorkspaceUserWorkspaceNormalizer.php b/generated/Normalizer/WorkspaceUserWorkspaceNormalizer.php index a934c05..5846052 100644 --- a/generated/Normalizer/WorkspaceUserWorkspaceNormalizer.php +++ b/generated/Normalizer/WorkspaceUserWorkspaceNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,183 +20,90 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class WorkspaceUserWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class WorkspaceUserWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('users', $data)) { - $values = []; - foreach ($data['users'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class, 'json', $context); - } - $object->setUsers($values); - unset($data['users']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('unread_notifications_count', $data)) { - $object->setUnreadNotificationsCount($data['unread_notifications_count']); - unset($data['unread_notifications_count']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('users', $data)) { + $values = []; + foreach ($data['users'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class, 'json', $context); } - - return $data; + $object->setUsers($values); + unset($data['users']); } - - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => false]; + if (\array_key_exists('order', $data)) { + $object->setOrder($data['order']); + unset($data['order']); } - } -} else { - class WorkspaceUserWorkspaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class === $type; + if (\array_key_exists('permissions', $data)) { + $object->setPermissions($data['permissions']); + unset($data['permissions']); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class === get_class($data); + if (\array_key_exists('unread_notifications_count', $data)) { + $object->setUnreadNotificationsCount($data['unread_notifications_count']); + unset($data['unread_notifications_count']); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('users', $data)) { - $values = []; - foreach ($data['users'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceUser::class, 'json', $context); - } - $object->setUsers($values); - unset($data['users']); - } - if (\array_key_exists('order', $data)) { - $object->setOrder($data['order']); - unset($data['order']); - } - if (\array_key_exists('permissions', $data)) { - $object->setPermissions($data['permissions']); - unset($data['permissions']); - } - if (\array_key_exists('unread_notifications_count', $data)) { - $object->setUnreadNotificationsCount($data['unread_notifications_count']); - unset($data['unread_notifications_count']); - } - if (\array_key_exists('generative_ai_models_enabled', $data)) { - $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); - unset($data['generative_ai_models_enabled']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } + if (\array_key_exists('generative_ai_models_enabled', $data)) { + $object->setGenerativeAiModelsEnabled($data['generative_ai_models_enabled']); + unset($data['generative_ai_models_enabled']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - foreach ($object as $key => $value) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value; - } - } + return $object; + } - return $data; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + foreach ($data as $key => $value) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value; + } } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => false]; - } + return $dataArray; + } + + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\WorkspaceUserWorkspace::class => false]; } } diff --git a/generated/Normalizer/WorkspacesAdminResponseNormalizer.php b/generated/Normalizer/WorkspacesAdminResponseNormalizer.php index dfbb3a9..00fed56 100644 --- a/generated/Normalizer/WorkspacesAdminResponseNormalizer.php +++ b/generated/Normalizer/WorkspacesAdminResponseNormalizer.php @@ -13,7 +13,6 @@ use CedricZiel\Baserow\Generated\Runtime\Normalizer\CheckArray; use CedricZiel\Baserow\Generated\Runtime\Normalizer\ValidatorTrait; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; @@ -21,225 +20,111 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class WorkspacesAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +class WorkspacesAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface +{ + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; + return \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class === $type; + } - public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class === $type; - } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class === get_class($data); + } - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class === get_class($data); + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - - public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('users', $data)) { - $values = []; - foreach ($data['users'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class, 'json', $context); - } - $object->setUsers($values); - unset($data['users']); - } - if (\array_key_exists('application_count', $data)) { - $object->setApplicationCount($data['application_count']); - unset($data['application_count']); - } - if (\array_key_exists('row_count', $data)) { - $object->setRowCount($data['row_count']); - unset($data['row_count']); - } - if (\array_key_exists('storage_usage', $data) && null !== $data['storage_usage']) { - $object->setStorageUsage($data['storage_usage']); - unset($data['storage_usage']); - } elseif (\array_key_exists('storage_usage', $data) && null === $data['storage_usage']) { - $object->setStorageUsage(null); - } - if (\array_key_exists('seats_taken', $data)) { - $object->setSeatsTaken($data['seats_taken']); - unset($data['seats_taken']); - } - if (\array_key_exists('free_users', $data)) { - $object->setFreeUsers($data['free_users']); - unset($data['free_users']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse(); + if (null === $data || false === \is_array($data)) { return $object; } - - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - $data['name'] = $object->getName(); + if (\array_key_exists('id', $data)) { + $object->setId($data['id']); + unset($data['id']); + } + if (\array_key_exists('name', $data)) { + $object->setName($data['name']); + unset($data['name']); + } + if (\array_key_exists('users', $data)) { $values = []; - foreach ($object->getUsers() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['users'] = $values; - $data['application_count'] = $object->getApplicationCount(); - if ($object->isInitialized('storageUsage') && null !== $object->getStorageUsage()) { - $data['storage_usage'] = $object->getStorageUsage(); + foreach ($data['users'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class, 'json', $context); } - $data['seats_taken'] = $object->getSeatsTaken(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } + $object->setUsers($values); + unset($data['users']); + } + if (\array_key_exists('application_count', $data)) { + $object->setApplicationCount($data['application_count']); + unset($data['application_count']); + } + if (\array_key_exists('row_count', $data)) { + $object->setRowCount($data['row_count']); + unset($data['row_count']); + } + if (\array_key_exists('storage_usage', $data) && null !== $data['storage_usage']) { + $object->setStorageUsage($data['storage_usage']); + unset($data['storage_usage']); + } elseif (\array_key_exists('storage_usage', $data) && null === $data['storage_usage']) { + $object->setStorageUsage(null); + } + if (\array_key_exists('seats_taken', $data)) { + $object->setSeatsTaken($data['seats_taken']); + unset($data['seats_taken']); + } + if (\array_key_exists('free_users', $data)) { + $object->setFreeUsers($data['free_users']); + unset($data['free_users']); + } + if (\array_key_exists('created_on', $data)) { + $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); + unset($data['created_on']); + } + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $object[$key] = $value_1; } - - return $data; } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => false]; - } + return $object; } -} else { - class WorkspacesAdminResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, ?string $format = null, array $context = []): bool - { - return \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class === $type; + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $dataArray = []; + $dataArray['name'] = $data->getName(); + $values = []; + foreach ($data->getUsers() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - - public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool - { - return is_object($data) && \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class === get_class($data); + $dataArray['users'] = $values; + $dataArray['application_count'] = $data->getApplicationCount(); + if ($data->isInitialized('storageUsage') && null !== $data->getStorageUsage()) { + $dataArray['storage_usage'] = $data->getStorageUsage(); } - - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('id', $data)) { - $object->setId($data['id']); - unset($data['id']); - } - if (\array_key_exists('name', $data)) { - $object->setName($data['name']); - unset($data['name']); - } - if (\array_key_exists('users', $data)) { - $values = []; - foreach ($data['users'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \CedricZiel\Baserow\Generated\Model\WorkspaceAdminUsers::class, 'json', $context); - } - $object->setUsers($values); - unset($data['users']); - } - if (\array_key_exists('application_count', $data)) { - $object->setApplicationCount($data['application_count']); - unset($data['application_count']); - } - if (\array_key_exists('row_count', $data)) { - $object->setRowCount($data['row_count']); - unset($data['row_count']); - } - if (\array_key_exists('storage_usage', $data) && null !== $data['storage_usage']) { - $object->setStorageUsage($data['storage_usage']); - unset($data['storage_usage']); - } elseif (\array_key_exists('storage_usage', $data) && null === $data['storage_usage']) { - $object->setStorageUsage(null); + $dataArray['seats_taken'] = $data->getSeatsTaken(); + foreach ($data as $key => $value_1) { + if (preg_match('/.*/', (string) $key)) { + $dataArray[$key] = $value_1; } - if (\array_key_exists('seats_taken', $data)) { - $object->setSeatsTaken($data['seats_taken']); - unset($data['seats_taken']); - } - if (\array_key_exists('free_users', $data)) { - $object->setFreeUsers($data['free_users']); - unset($data['free_users']); - } - if (\array_key_exists('created_on', $data)) { - $object->setCreatedOn(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['created_on'])); - unset($data['created_on']); - } - foreach ($data as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $object[$key] = $value_1; - } - } - - return $object; } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - $data['name'] = $object->getName(); - $values = []; - foreach ($object->getUsers() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['users'] = $values; - $data['application_count'] = $object->getApplicationCount(); - if ($object->isInitialized('storageUsage') && null !== $object->getStorageUsage()) { - $data['storage_usage'] = $object->getStorageUsage(); - } - $data['seats_taken'] = $object->getSeatsTaken(); - foreach ($object as $key => $value_1) { - if (preg_match('/.*/', (string) $key)) { - $data[$key] = $value_1; - } - } - - return $data; - } + return $dataArray; + } - public function getSupportedTypes(?string $format = null): array - { - return [\CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => false]; - } + public function getSupportedTypes(?string $format = null): array + { + return [\CedricZiel\Baserow\Generated\Model\WorkspacesAdminResponse::class => false]; } } diff --git a/generated/Runtime/Client/BaseEndpoint.php b/generated/Runtime/Client/BaseEndpoint.php index aeaf7f9..825cf32 100644 --- a/generated/Runtime/Client/BaseEndpoint.php +++ b/generated/Runtime/Client/BaseEndpoint.php @@ -17,10 +17,10 @@ abstract class BaseEndpoint implements Endpoint { - protected $formParameters = []; - protected $queryParameters = []; - protected $headerParameters = []; - protected $body; + protected array $formParameters = []; + protected array $queryParameters = []; + protected array $headerParameters = []; + protected mixed $body; abstract public function getMethod(): string; @@ -40,11 +40,11 @@ protected function getExtraHeaders(): array public function getQueryString(): string { $optionsResolved = $this->getQueryOptionsResolver()->resolve($this->queryParameters); - $optionsResolved = array_map(function ($value) { - return null !== $value ? $value : ''; + $optionsResolved = array_map(static function ($value) { + return $value ?? ''; }, $optionsResolved); - return http_build_query($optionsResolved, '', '&', PHP_QUERY_RFC3986); + return http_build_query($optionsResolved, '', '&', \PHP_QUERY_RFC3986); } public function getHeaders(array $baseHeaders = []): array diff --git a/generated/Runtime/Client/Client.php b/generated/Runtime/Client/Client.php index 6c66085..dcd18f5 100644 --- a/generated/Runtime/Client/Client.php +++ b/generated/Runtime/Client/Client.php @@ -22,22 +22,10 @@ abstract class Client { public const FETCH_RESPONSE = 'response'; public const FETCH_OBJECT = 'object'; - /** - * @var ClientInterface - */ - protected $httpClient; - /** - * @var RequestFactoryInterface - */ - protected $requestFactory; - /** - * @var SerializerInterface - */ - protected $serializer; - /** - * @var StreamFactoryInterface - */ - protected $streamFactory; + protected ClientInterface $httpClient; + protected RequestFactoryInterface $requestFactory; + protected SerializerInterface $serializer; + protected StreamFactoryInterface $streamFactory; public function __construct(ClientInterface $httpClient, RequestFactoryInterface $requestFactory, SerializerInterface $serializer, StreamFactoryInterface $streamFactory) { @@ -67,7 +55,7 @@ private function processEndpoint(Endpoint $endpoint): ResponseInterface { [$bodyHeaders, $body] = $endpoint->getBody($this->serializer, $this->streamFactory); $queryString = $endpoint->getQueryString(); - $uriGlue = false === strpos($endpoint->getUri(), '?') ? '?' : '&'; + $uriGlue = !str_contains($endpoint->getUri(), '?') ? '?' : '&'; $uri = '' !== $queryString ? $endpoint->getUri().$uriGlue.$queryString : $endpoint->getUri(); $request = $this->requestFactory->createRequest($endpoint->getMethod(), $uri); if ($body) { diff --git a/generated/Runtime/Normalizer/ReferenceNormalizer.php b/generated/Runtime/Normalizer/ReferenceNormalizer.php index 56bd053..585928c 100644 --- a/generated/Runtime/Normalizer/ReferenceNormalizer.php +++ b/generated/Runtime/Normalizer/ReferenceNormalizer.php @@ -11,39 +11,25 @@ namespace CedricZiel\Baserow\Generated\Runtime\Normalizer; use Jane\Component\JsonSchemaRuntime\Reference; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -if (Kernel::MAJOR_VERSION >= 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4) { - class ReferenceNormalizer implements NormalizerInterface +class ReferenceNormalizer implements NormalizerInterface +{ + public function normalize(mixed $data, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { - public function normalize(mixed $object, ?string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $ref = []; - $ref['$ref'] = (string) $object->getReferenceUri(); - - return $ref; - } - - public function supportsNormalization($data, $format = null): bool - { - return $data instanceof Reference; - } + $ref = []; + $ref['$ref'] = (string) $data->getReferenceUri(); + + return $ref; } -} else { - class ReferenceNormalizer implements NormalizerInterface + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof Reference; + } + + public function getSupportedTypes(?string $format): array { - public function normalize($object, $format = null, array $context = []) - { - $ref = []; - $ref['$ref'] = (string) $object->getReferenceUri(); - - return $ref; - } - - public function supportsNormalization($data, $format = null): bool - { - return $data instanceof Reference; - } + return [Reference::class => false]; } }